From 7c0edddc927d3793480f45a42988d713e3fc0b57 Mon Sep 17 00:00:00 2001 From: rkhudov Date: Fri, 3 Nov 2023 16:38:22 +0000 Subject: [PATCH 1/6] Make it neat --- .circleci/config.yaml | 24 ------ btf_interp/src/lib.rs | 182 ++++++++++++++++++++++++++++++++---------- btf_types/src/lib.rs | 70 ++++++++-------- src/main.rs | 10 ++- 4 files changed, 185 insertions(+), 101 deletions(-) delete mode 100644 .circleci/config.yaml diff --git a/.circleci/config.yaml b/.circleci/config.yaml deleted file mode 100644 index d70775a..0000000 --- a/.circleci/config.yaml +++ /dev/null @@ -1,24 +0,0 @@ -version: 2.1 - -jobs: - build: - docker: - - image: cimg/rust:1.71.0 - steps: - - checkout - - restore_cache: - key: project-cache - - run: - name: Check version - command: cargo --version - - run: - name: Check formatting - command: cargo fmt --all -- --check - - run: - name: Run Tests - command: cargo test --al - - save_cache: - key: project-cache - paths: - - "~/.cargo" - - "./target" diff --git a/btf_interp/src/lib.rs b/btf_interp/src/lib.rs index 4d64765..59cfcf8 100644 --- a/btf_interp/src/lib.rs +++ b/btf_interp/src/lib.rs @@ -1,14 +1,15 @@ //! Provide interpreter implementation for BF program. -use btf_types::BrainFuckProgram; +use btf_types::{BrainFuckProgram, RawInstructions}; +use std::fmt::Debug; use std::io::{Read, Write}; use std::num::NonZeroUsize; /// Provide trait for cell in Virtual Machine. -pub trait CellKind { +pub trait CellKind: Default + Clone + Debug { /// Wrapper to increase value by 1 in the cell. - fn wrapping_increment(&mut self); + fn wrapping_increment(&mut self) -> Self; /// Wrapper to decrease value by 1 in the cell. - fn wrapping_decrement(&mut self); + fn wrapping_decrement(&mut self) -> Self; /// Wrapper to set value in the cell. fn wrapping_set_value(&mut self, value: u8); /// Wrapper to get value from the cell. @@ -18,12 +19,12 @@ pub trait CellKind { /// Provide implementation for u8 type cell in Virtual Machine. impl CellKind for u8 { /// Implementation for u8 cell type of wrapper to increase value by 1 in it. - fn wrapping_increment(&mut self) { - *self += 1; + fn wrapping_increment(&mut self) -> Self { + self.wrapping_add(1) } /// Implementation for u8 cell type of wrapper to decrease value by 1 in it. - fn wrapping_decrement(&mut self) { - *self -= 1; + fn wrapping_decrement(&mut self) -> Self { + self.wrapping_sub(1) } /// Implementation for u8 cell type of wrapper to set value in it. fn wrapping_set_value(&mut self, value: u8) { @@ -51,12 +52,12 @@ pub enum VMError { pub struct VirtualMachine<'a, T> { /// The collection to store elements of the tape. tape: Vec, - /// The size of the tape. - tape_size: usize, /// Whether to allow adjust size of the tape of not. adjust_tape: bool, /// The pointer to the current element of tape. head: usize, + /// The pointer to the current instructoin. + instruction_pointer: usize, /// BrainFuck Program. program: &'a BrainFuckProgram, } @@ -71,11 +72,12 @@ where size: Option, adjust_tape: Option, ) -> Self { + let tape_size = size.map(NonZeroUsize::get).unwrap_or(3000); VirtualMachine { - tape: Vec::new(), - tape_size: size.map(NonZeroUsize::get).unwrap_or(3000), + tape: vec![T::default(); tape_size], adjust_tape: adjust_tape.unwrap_or(false), head: 0, + instruction_pointer: 0, program, } } @@ -92,66 +94,74 @@ where } /// Go to the next element in tape. If tape size exceeded, error message is shown. - fn next_element(&mut self) -> Result<(), VMError> { - if self.head + 1 == self.tape_size { - let instruction = &self.program.instructions()[self.head]; + fn next_element(&mut self) -> Result { + if self.head + 1 == self.tape.len() { + let instruction = &self.program.instructions()[self.instruction_pointer]; return Err(VMError::NextElementNotReachable { line: instruction.line(), position: instruction.position(), }); } self.head += 1; - Ok(()) + self.instruction_pointer += 1; + Ok(self.instruction_pointer) } /// Go to the previous element in tape. If it is the first element, error message is shown. - fn previous_element(&mut self) -> Result<(), VMError> { + fn previous_element(&mut self) -> Result { if self.head == 0 { - let instruction = &self.program.instructions()[self.head]; + let instruction = &self.program.instructions()[self.instruction_pointer]; return Err(VMError::PreviousElementNotReachanble { line: instruction.line(), position: instruction.position(), }); } self.head -= 1; - Ok(()) + self.instruction_pointer += 1; + Ok(self.instruction_pointer) } /// Add 1 to the element where head is pointing to. - fn wrapped_add(&mut self) -> Result<(), u8> { - self.tape[self.head].wrapping_increment(); - Ok(()) + fn wrapped_add(&mut self) -> Result { + self.tape[self.head] = self.tape[self.head].wrapping_increment(); + self.instruction_pointer += 1; + Ok(self.instruction_pointer) } /// Substract 1 to the element where head is pointing to. - fn wrapped_sub(&mut self) -> Result<(), u8> { - self.tape[self.head].wrapping_decrement(); - Ok(()) + fn wrapped_sub(&mut self) -> Result { + self.tape[self.head] = self.tape[self.head].wrapping_decrement(); + self.instruction_pointer += 1; + Ok(self.instruction_pointer) } - /// Basic IO read. - fn read(&mut self, reader: &mut impl Read) -> Result<(), VMError> { + /// IO byte read. + fn read(&mut self, reader: &mut impl Read) -> Result { let mut buffer = [0; 1]; match reader.read_exact(&mut buffer) { Ok(()) => self.tape[self.head].wrapping_set_value(buffer[0]), Err(_err) => { - let instruction = &self.program.instructions()[self.head]; + let instruction = &self.program.instructions()[self.instruction_pointer]; return Err(VMError::IOError { line: instruction.line(), position: instruction.position(), }); } } - Ok(()) + self.instruction_pointer += 1; + Ok(self.instruction_pointer) } - /// Basic IO write. - fn output(&self, writer: &mut impl Write) -> Result<(), VMError> { + /// IO byte write. + fn output(&mut self, writer: &mut impl Write) -> Result { match writer.write_all(&[self.tape[self.head].wrapping_get_value()]) { Ok(()) => match writer.flush() { - Ok(()) => Ok(()), + Ok(()) => { + self.instruction_pointer += 1; + Ok(self.instruction_pointer) + } Err(_err) => { - let instruction = &self.program.instructions()[self.head]; + let instruction = &self.program.instructions()[self.instruction_pointer]; Err(VMError::IOError { line: instruction.line(), position: instruction.position(), @@ -159,7 +169,7 @@ where } }, Err(_err) => { - let instruction = &self.program.instructions()[self.head]; + let instruction = &self.program.instructions()[self.instruction_pointer]; Err(VMError::IOError { line: instruction.line(), position: instruction.position(), @@ -167,6 +177,62 @@ where } } } + + /// Jump to the pointer of correspoding non zero jump command. + fn loop_zero_jump(&self) -> Result { + let instruction = &self.program.instructions()[self.instruction_pointer]; + let next_instruction_pointer = self + .program + .brackets_map() + .get(&self.instruction_pointer) + .ok_or(VMError::NextElementNotReachable { + line: instruction.line(), + position: instruction.position(), + })?; + Ok(*next_instruction_pointer) + } + + /// Jump to the pointer of correspoding zero jump command, if value in cell not 0. Otherwise, go to the next command. + fn loop_non_zero_jump(&mut self) -> Result { + let next_instruction_pointer = if self.tape[self.head].wrapping_get_value() != 0 { + let instruction = &self.program.instructions()[self.instruction_pointer]; + self.program + .brackets_map() + .get(&self.instruction_pointer) + .ok_or(VMError::NextElementNotReachable { + line: instruction.line(), + position: instruction.position(), + })? + + 1 + } else { + self.instruction_pointer += 1; + self.instruction_pointer + }; + Ok(next_instruction_pointer) + } + + /// Main interpreter of BF program. + pub fn interpret( + &mut self, + mut input: &mut impl Read, + mut output: &mut impl Write, + ) -> Result<(), VMError> { + while self.instruction_pointer < self.program.instructions().len() { + let current_instruction_pointer = + self.program.instructions()[self.instruction_pointer].instruction(); + self.instruction_pointer = match current_instruction_pointer { + RawInstructions::IncrementDataPointer => self.next_element()?, + RawInstructions::DecrementDataPointer => self.previous_element()?, + RawInstructions::IncrementByte => self.wrapped_add()?, + RawInstructions::DecrementByte => self.wrapped_sub()?, + RawInstructions::OutputByte => self.output(&mut output)?, + RawInstructions::AcceptByte => self.read(&mut input)?, + RawInstructions::ZeroJump => self.loop_zero_jump()?, + RawInstructions::NonZeroJump => self.loop_non_zero_jump()?, + }; + } + Ok(()) + } } #[cfg(test)] @@ -189,8 +255,7 @@ mod tests { let program = BrainFuckProgram::from_file(&file_path).unwrap(); let default_vm: VirtualMachine = VirtualMachine::new(&program, None, None); - assert_eq!(default_vm.tape_size, 3000); - assert_eq!(default_vm.tape.len(), 0); + assert_eq!(default_vm.tape.len(), 3000); assert_eq!(default_vm.head, 0); assert!(!default_vm.adjust_tape); @@ -208,8 +273,7 @@ mod tests { let vm: VirtualMachine = VirtualMachine::new(&program, NonZeroUsize::new(100), Some(true)); - assert_eq!(vm.tape_size, 100); - assert_eq!(vm.tape.len(), 0); + assert_eq!(vm.tape.len(), 100); assert_eq!(vm.head, 0); assert!(vm.adjust_tape); @@ -248,8 +312,8 @@ mod tests { let program = BrainFuckProgram::from_file(&file_path).unwrap(); let mut vm: VirtualMachine = VirtualMachine::new(&program, None, None); - assert_eq!(vm.next_element(), Ok(())); - assert_eq!(vm.previous_element(), Ok(())); + assert_eq!(vm.next_element(), Ok(1)); + assert_eq!(vm.previous_element(), Ok(2)); drop(tmp_file); tmp_dir.close().unwrap(); @@ -288,7 +352,43 @@ mod tests { let program = BrainFuckProgram::from_file(&file_path).unwrap(); let mut vm: VirtualMachine = VirtualMachine::new(&program, None, None); - assert_eq!(vm.next_element(), Ok(())); + assert_eq!(vm.next_element(), Ok(1)); + + drop(tmp_file); + tmp_dir.close().unwrap(); + } + + #[test] + fn test_zero_jump_loop() { + let tmp_dir = TempDir::new("example").unwrap(); + let file_path = tmp_dir.path().join("my-temporary-note.txt"); + let mut tmp_file = File::create(&file_path).unwrap(); + let _ = writeln!(tmp_file, "[-]"); + + let mut program = BrainFuckProgram::from_file(&file_path).unwrap(); + let brackets = program.validate_brackets().unwrap(); + program.set_brackets_map(brackets); + + let vm: VirtualMachine = VirtualMachine::new(&program, None, None); + assert_eq!(vm.loop_zero_jump(), Ok(2)); + + drop(tmp_file); + tmp_dir.close().unwrap(); + } + + #[test] + fn test_non_zero_jump_loop() { + let tmp_dir = TempDir::new("example").unwrap(); + let file_path = tmp_dir.path().join("my-temporary-note.txt"); + let mut tmp_file = File::create(&file_path).unwrap(); + let _ = writeln!(tmp_file, "[-]"); + + let mut program = BrainFuckProgram::from_file(&file_path).unwrap(); + let brackets = program.validate_brackets().unwrap(); + program.set_brackets_map(brackets); + + let mut vm: VirtualMachine = VirtualMachine::new(&program, None, None); + assert_eq!(vm.loop_non_zero_jump(), Ok(1)); drop(tmp_file); tmp_dir.close().unwrap(); diff --git a/btf_types/src/lib.rs b/btf_types/src/lib.rs index df2274d..d66c686 100644 --- a/btf_types/src/lib.rs +++ b/btf_types/src/lib.rs @@ -1,5 +1,5 @@ //! Provide types implementation for BF interpreter. -use std::cmp::Ordering; +use std::collections::HashMap; use std::error::Error; use std::fmt; use std::fs; @@ -103,6 +103,8 @@ pub struct BrainFuckProgram { filename: PathBuf, /// List of instructions with location parsed from file. instructions: Vec, + /// Mapping for brackets. + brackets_map: HashMap, } impl BrainFuckProgram { @@ -133,6 +135,7 @@ impl BrainFuckProgram { BrainFuckProgram { filename: filename.as_ref().to_path_buf(), instructions, + brackets_map: HashMap::new(), } } @@ -146,6 +149,15 @@ impl BrainFuckProgram { &self.instructions[..] } + pub fn set_brackets_map(&mut self, brackets_map: HashMap) { + self.brackets_map = brackets_map; + } + + /// Get list of instructions for BF program. + pub fn brackets_map(&self) -> &HashMap { + &self.brackets_map + } + /// Parse BF program from file. pub fn from_file>(file_path: T) -> Result> { let file_path_ref = file_path.as_ref(); @@ -155,47 +167,34 @@ impl BrainFuckProgram { } /// Validate if brackets are balanced. - pub fn validate_brackets(&self) -> Result<(), String> { - let mut opened_brackets = Vec::new(); - let mut closed_brackets = Vec::new(); - for instruction_position in self.instructions() { - match instruction_position.instruction() { - RawInstructions::ZeroJump => opened_brackets.push(instruction_position), + pub fn validate_brackets(&self) -> Result, String> { + let mut brackets_map = HashMap::::new(); + let mut opened_brackets = Vec::<(usize, &IntructionPosition)>::new(); + for (position, instruction) in self.instructions().iter().enumerate() { + match instruction.instruction() { + RawInstructions::ZeroJump => opened_brackets.push((position, instruction)), RawInstructions::NonZeroJump => { - closed_brackets.push(instruction_position); - if opened_brackets.len() < closed_brackets.len() { - return Err(format!("Error in input file {}, no open bracket found matching bracket at line {} column {}.", self.filename.display(), instruction_position.line(), instruction_position.position())); + if let Some(opened_bracket) = opened_brackets.pop() { + brackets_map.insert(opened_bracket.0, position); + brackets_map.insert(position, opened_bracket.0); + } else { + return Err(format!("Error in input file, no open bracket found matching bracket at line {} column {}.", instruction.line(), instruction.position())); } } _ => {} } } - match opened_brackets.len().cmp(&closed_brackets.len()) { - Ordering::Greater => { - let first_bracket = opened_brackets.first(); - match first_bracket { - None => return Err(format!("Error in input file {}, no open brackets found.", self.filename.display())), - Some(bracket) => return Err(format!("Error in input file {}, no close bracket found matching bracket at line {} column {}.", self.filename.display(), bracket.line(), bracket.position())), - } - } - Ordering::Less => { - let last_bracket = closed_brackets.last(); - match last_bracket { - None => return Err(format!("Error in input file {}, no closed brackets found.", self.filename.display())), - Some(bracket) => return Err(format!("Error in input file {}, no open bracket found matching bracket at line {} column {}.", self.filename.display(), bracket.line(), bracket.position())), - } - } - Ordering::Equal => {} + if let Some((_, instruction)) = opened_brackets.last() { + return Err(format!("Error in input file, no close bracket found matching bracket at line {} column {}.", instruction.line(), instruction.position())); } - - Ok(()) + Ok(brackets_map) } } #[cfg(test)] mod tests { - use std::path::PathBuf; + use std::{collections::HashMap, path::PathBuf}; use crate::BrainFuckProgram; @@ -234,9 +233,10 @@ mod tests { let test_filename = PathBuf::from("testfilename"); let test_content = "sometext\n><+-.,[]\ncomment <".to_string(); let bf_program = BrainFuckProgram::new(test_filename.as_path(), test_content); + let mapping: HashMap = HashMap::from([(6, 7), (7, 6)]); assert_eq!( bf_program.validate_brackets(), - Ok(()), + Ok(mapping), "No errors during program parsing." ) } @@ -248,7 +248,10 @@ mod tests { let bf_program = BrainFuckProgram::new(test_filename.as_path(), test_content); assert_eq!( bf_program.validate_brackets(), - Err("Error in input file testfilename, no close bracket found matching bracket at line 2 column 7.".to_string()), + Err( + "Error in input file, no close bracket found matching bracket at line 2 column 7." + .to_string() + ), "Error during program parsing." ) } @@ -260,7 +263,10 @@ mod tests { let bf_program = BrainFuckProgram::new(test_filename.as_path(), test_content); assert_eq!( bf_program.validate_brackets(), - Err("Error in input file testfilename, no open bracket found matching bracket at line 2 column 7.".to_string()), + Err( + "Error in input file, no open bracket found matching bracket at line 2 column 7." + .to_string() + ), "Error during program parsing." ) } diff --git a/src/main.rs b/src/main.rs index 218d43e..1d82d18 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,17 +4,19 @@ use btf_interp::VirtualMachine; use btf_types::BrainFuckProgram; use cli::Args; use std::error::Error; +use std::io::{stderr, stdin}; use std::process::{exit, ExitCode}; use structopt::StructOpt; fn run_bft(args: Args) -> Result<(), Box> { let bf_program = BrainFuckProgram::from_file(args.program); match bf_program { - Ok(bf_program) => { - bf_program.validate_brackets()?; - let vm: VirtualMachine = + Ok(mut bf_program) => { + let brackets = bf_program.validate_brackets()?; + bf_program.set_brackets_map(brackets); + let mut vm: VirtualMachine = VirtualMachine::new(&bf_program, args.cells, args.extensible); - vm.interpreter(); + let _ = vm.interpret(&mut stdin(), &mut stderr()); } Err(e) => { eprintln!("{}", e); From 47b6626bf3b5ca29006fce880ec22ec699fdb282 Mon Sep 17 00:00:00 2001 From: rkhudov Date: Thu, 16 Nov 2023 10:44:25 +0000 Subject: [PATCH 2/6] Retain API of cell kind --- btf_interp/src/lib.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/btf_interp/src/lib.rs b/btf_interp/src/lib.rs index 59cfcf8..1c0d595 100644 --- a/btf_interp/src/lib.rs +++ b/btf_interp/src/lib.rs @@ -7,9 +7,9 @@ use std::num::NonZeroUsize; /// Provide trait for cell in Virtual Machine. pub trait CellKind: Default + Clone + Debug { /// Wrapper to increase value by 1 in the cell. - fn wrapping_increment(&mut self) -> Self; + fn wrapping_increment(&mut self); /// Wrapper to decrease value by 1 in the cell. - fn wrapping_decrement(&mut self) -> Self; + fn wrapping_decrement(&mut self); /// Wrapper to set value in the cell. fn wrapping_set_value(&mut self, value: u8); /// Wrapper to get value from the cell. @@ -19,12 +19,12 @@ pub trait CellKind: Default + Clone + Debug { /// Provide implementation for u8 type cell in Virtual Machine. impl CellKind for u8 { /// Implementation for u8 cell type of wrapper to increase value by 1 in it. - fn wrapping_increment(&mut self) -> Self { - self.wrapping_add(1) + fn wrapping_increment(&mut self) { + *self = self.wrapping_add(1); } /// Implementation for u8 cell type of wrapper to decrease value by 1 in it. - fn wrapping_decrement(&mut self) -> Self { - self.wrapping_sub(1) + fn wrapping_decrement(&mut self) { + *self = self.wrapping_sub(1); } /// Implementation for u8 cell type of wrapper to set value in it. fn wrapping_set_value(&mut self, value: u8) { @@ -123,14 +123,14 @@ where /// Add 1 to the element where head is pointing to. fn wrapped_add(&mut self) -> Result { - self.tape[self.head] = self.tape[self.head].wrapping_increment(); + self.tape[self.head].wrapping_increment(); self.instruction_pointer += 1; Ok(self.instruction_pointer) } /// Substract 1 to the element where head is pointing to. fn wrapped_sub(&mut self) -> Result { - self.tape[self.head] = self.tape[self.head].wrapping_decrement(); + self.tape[self.head].wrapping_decrement(); self.instruction_pointer += 1; Ok(self.instruction_pointer) } From b97ac86c08b126ad2ed7fc32974f17be31e339d7 Mon Sep 17 00:00:00 2001 From: rkhudov Date: Mon, 27 Nov 2023 16:38:11 +0000 Subject: [PATCH 3/6] Handle adjustmetns for the tape --- .trunk/.gitignore | 8 ++++++++ .trunk/configs/.markdownlint.yaml | 10 ++++++++++ .trunk/trunk.yaml | 25 +++++++++++++++++++++++++ btf_interp/src/lib.rs | 31 ++++++++++++++++++++++++++----- 4 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 .trunk/.gitignore create mode 100644 .trunk/configs/.markdownlint.yaml create mode 100644 .trunk/trunk.yaml diff --git a/.trunk/.gitignore b/.trunk/.gitignore new file mode 100644 index 0000000..1e24652 --- /dev/null +++ b/.trunk/.gitignore @@ -0,0 +1,8 @@ +*out +*logs +*actions +*notifications +*tools +plugins +user_trunk.yaml +user.yaml diff --git a/.trunk/configs/.markdownlint.yaml b/.trunk/configs/.markdownlint.yaml new file mode 100644 index 0000000..fb94039 --- /dev/null +++ b/.trunk/configs/.markdownlint.yaml @@ -0,0 +1,10 @@ +# Autoformatter friendly markdownlint config (all formatting rules disabled) +default: true +blank_lines: false +bullet: false +html: false +indentation: false +line_length: false +spaces: false +url: false +whitespace: false diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 0000000..022df19 --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,25 @@ +version: 0.1 +cli: + version: 1.17.2 +plugins: + sources: + - id: trunk + ref: v1.3.0 + uri: https://github.com/trunk-io/plugins +lint: + enabled: + - git-diff-check + - markdownlint@0.37.0 + - prettier@3.1.0 + - trufflehog@3.63.2-rc0 +runtimes: + enabled: + - node@18.12.1 + - python@3.10.8 +actions: + disabled: + - trunk-announce + - trunk-check-pre-push + - trunk-fmt-pre-commit + enabled: + - trunk-upgrade-available diff --git a/btf_interp/src/lib.rs b/btf_interp/src/lib.rs index 1c0d595..e684018 100644 --- a/btf_interp/src/lib.rs +++ b/btf_interp/src/lib.rs @@ -96,11 +96,14 @@ where /// Go to the next element in tape. If tape size exceeded, error message is shown. fn next_element(&mut self) -> Result { if self.head + 1 == self.tape.len() { - let instruction = &self.program.instructions()[self.instruction_pointer]; - return Err(VMError::NextElementNotReachable { - line: instruction.line(), - position: instruction.position(), - }); + if !self.adjust_tape { + let instruction = &self.program.instructions()[self.instruction_pointer]; + return Err(VMError::NextElementNotReachable { + line: instruction.line(), + position: instruction.position(), + }); + } + self.tape.push(T::default()); } self.head += 1; self.instruction_pointer += 1; @@ -358,6 +361,24 @@ mod tests { tmp_dir.close().unwrap(); } + #[test] + fn test_adjustable_tape_next_element() { + let tmp_dir = TempDir::new("example").unwrap(); + let file_path = tmp_dir.path().join("my-temporary-note.txt"); + let tmp_file = File::create(&file_path).unwrap(); + + let program = BrainFuckProgram::from_file(&file_path).unwrap(); + + let mut vm: VirtualMachine = + VirtualMachine::new(&program, NonZeroUsize::new(1), Some(true)); + assert_eq!(vm.next_element(), Ok(1)); + assert_eq!(vm.next_element(), Ok(2)); + assert_eq!(vm.next_element(), Ok(3)); + + drop(tmp_file); + tmp_dir.close().unwrap(); + } + #[test] fn test_zero_jump_loop() { let tmp_dir = TempDir::new("example").unwrap(); From a2dd8ef2df55a03feeecca64ea7bcd2d06350158 Mon Sep 17 00:00:00 2001 From: Rostyslav Khudov <59306666+rkhudov@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:39:40 +0000 Subject: [PATCH 4/6] Delete .trunk/trunk.yaml --- .trunk/trunk.yaml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .trunk/trunk.yaml diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml deleted file mode 100644 index 022df19..0000000 --- a/.trunk/trunk.yaml +++ /dev/null @@ -1,25 +0,0 @@ -version: 0.1 -cli: - version: 1.17.2 -plugins: - sources: - - id: trunk - ref: v1.3.0 - uri: https://github.com/trunk-io/plugins -lint: - enabled: - - git-diff-check - - markdownlint@0.37.0 - - prettier@3.1.0 - - trufflehog@3.63.2-rc0 -runtimes: - enabled: - - node@18.12.1 - - python@3.10.8 -actions: - disabled: - - trunk-announce - - trunk-check-pre-push - - trunk-fmt-pre-commit - enabled: - - trunk-upgrade-available From 9e66020dacd0098e73f8ed56f1d6eead932240d6 Mon Sep 17 00:00:00 2001 From: Rostyslav Khudov <59306666+rkhudov@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:39:50 +0000 Subject: [PATCH 5/6] Delete .trunk/.gitignore --- .trunk/.gitignore | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .trunk/.gitignore diff --git a/.trunk/.gitignore b/.trunk/.gitignore deleted file mode 100644 index 1e24652..0000000 --- a/.trunk/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*out -*logs -*actions -*notifications -*tools -plugins -user_trunk.yaml -user.yaml From 09f9fedb135dac29dd2e966e27436319d5b6f563 Mon Sep 17 00:00:00 2001 From: Rostyslav Khudov <59306666+rkhudov@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:39:58 +0000 Subject: [PATCH 6/6] Delete .trunk/configs/.markdownlint.yaml --- .trunk/configs/.markdownlint.yaml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .trunk/configs/.markdownlint.yaml diff --git a/.trunk/configs/.markdownlint.yaml b/.trunk/configs/.markdownlint.yaml deleted file mode 100644 index fb94039..0000000 --- a/.trunk/configs/.markdownlint.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# Autoformatter friendly markdownlint config (all formatting rules disabled) -default: true -blank_lines: false -bullet: false -html: false -indentation: false -line_length: false -spaces: false -url: false -whitespace: false