diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6cb4eb6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,40 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +exclude: | + (?x)^( + .+\.(dbc|DBC) + )$ + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-added-large-files + - id: check-executables-have-shebangs + - id: check-json + - id: check-shebang-scripts-are-executable + exclude: '.+\.rs' # would be triggered by #![some_attribute] + - id: check-symlinks + - id: check-toml + - id: check-yaml + args: [ --allow-multiple-documents ] + - id: destroyed-symlinks + - id: end-of-file-fixer + - id: mixed-line-ending + args: [ --fix=lf ] + - id: trailing-whitespace + + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.5 + hooks: + - id: forbid-tabs + - id: remove-tabs + + - repo: local + hooks: + - id: cargo-fmt + name: Rust Format + description: "Automatically format Rust code with cargo fmt" + entry: sh -c "cargo fmt --all" + language: rust + pass_filenames: false diff --git a/LICENSE.md b/LICENSE.md index c11a473..8a5b7c3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/TODO.md b/TODO.md index 1a8405b..ea1fa2a 100644 --- a/TODO.md +++ b/TODO.md @@ -9,4 +9,4 @@ - [ ] Handle incomplete parsing by partially generating file to the point where the parser failed - [ ] Handle invalid c_string values and other values that can not easily be turned into ENUM names when generating ENUMS examples: - `VAL_ 2566722302 ReverseCurrentRangeSetting 31 "NotAvailable" 30 "Error" 16 "11101NotUsed" 15 "16" 14 "15" 13 "14" 12 "13" 11 "12" 10 "11" 9 "10" 8 "9" 7 "8" 6 "7" 5 "6" 4 "5" 3 "4" 2 "3" 1 "2" 0 "1";` - - `VAL_ 2560032510 LwVltgDscnnctDsredOperatingMode 15 "NoChange" 6 "1110Reserved" 5 "ManualConnect" 4 "ManualDisconnect" 1 "0011Reserved" 0 "Automatic";` \ No newline at end of file + - `VAL_ 2560032510 LwVltgDscnnctDsredOperatingMode 15 "NoChange" 6 "1110Reserved" 5 "ManualConnect" 4 "ManualDisconnect" 1 "0011Reserved" 0 "Automatic";` diff --git a/deny.toml b/deny.toml index 1039447..8f594ac 100644 --- a/deny.toml +++ b/deny.toml @@ -42,14 +42,14 @@ notice = "warn" # a note when they are encountered. ignore = [] # Threshold for security vulnerabilities, any vulnerability with a CVSS score -# lower than the range specified will be ignored. Note that ignored advisories +# lower than the range specified will be ignored. Note that ignored advisories # will still output a note when they are encountered. # * None - CVSS Score 0.0 # * Low - CVSS Score 0.1 - 3.9 # * Medium - CVSS Score 4.0 - 6.9 # * High - CVSS Score 7.0 - 8.9 # * Critical - CVSS Score 9.0 - 10.0 -#severity-threshold = +#severity-threshold = # This section is considered when running `cargo deny check licenses` # More documentation for the licenses section can be found here: @@ -75,7 +75,7 @@ copyleft = "warn" # * neither - The license will be denied if is FSF/Free *OR* OSI-approved allow-osi-fsf-free = "neither" # The confidence threshold for detecting a license from license text. -# The higher the value, the more closely the license text must be to the +# The higher the value, the more closely the license text must be to the # canonical license text of a valid SPDX license file. # [possible values: any between 0.0 and 1.0]. confidence-threshold = 0.8