From 18e9715240e72db0fc67605e72b1a730eb451e48 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 21 Sep 2025 13:38:57 +0200 Subject: [PATCH 1/3] Add rust formatter config file see also documentation of rustfmt: https://rust-lang.github.io/rustfmt/?version=v1.8.0 --- identify/extensions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/identify/extensions.py b/identify/extensions.py index 7460c5b..62ceab9 100644 --- a/identify/extensions.py +++ b/identify/extensions.py @@ -358,6 +358,7 @@ '.prettierignore': {'text', 'gitignore', 'prettierignore'}, '.pypirc': EXTENSIONS['ini'] | {'pypirc'}, '.rstcheck.cfg': EXTENSIONS['ini'], + '.rustfmt.toml': EXTENSIONS['toml'] | {'rustfmt'}, '.salt-lint': EXTENSIONS['yaml'] | {'salt-lint'}, '.sqlfluff': EXTENSIONS['ini'], '.yamllint': EXTENSIONS['yaml'] | {'yamllint'}, @@ -406,6 +407,7 @@ 'README': EXTENSIONS['txt'], 'Rakefile': EXTENSIONS['rb'], 'rebar.config': EXTENSIONS['erl'], + 'rustfmt.toml': EXTENSIONS['toml'] | {'rustfmt'}, 'setup.cfg': EXTENSIONS['ini'], 'sys.config': EXTENSIONS['erl'], 'sys.config.src': EXTENSIONS['erl'], From d11749167864aa4ea488edead1db196df96ec5f7 Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 21 Sep 2025 13:42:10 +0200 Subject: [PATCH 2/3] Add rust linter config file see also documentation of clippy: https://doc.rust-lang.org/clippy/configuration.html --- identify/extensions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/identify/extensions.py b/identify/extensions.py index 62ceab9..ecf6f46 100644 --- a/identify/extensions.py +++ b/identify/extensions.py @@ -335,6 +335,7 @@ '.browserslistrc': {'text', 'browserslistrc'}, '.clang-format': EXTENSIONS['yaml'], '.clang-tidy': EXTENSIONS['yaml'], + '.clippy.toml': EXTENSIONS['toml'] | {'clippy'}, '.codespellrc': EXTENSIONS['ini'] | {'codespellrc'}, '.coveragerc': EXTENSIONS['ini'] | {'coveragerc'}, '.cshrc': EXTENSIONS['csh'], @@ -373,6 +374,7 @@ 'BUILD': EXTENSIONS['bzl'], 'Cargo.toml': EXTENSIONS['toml'] | {'cargo'}, 'Cargo.lock': EXTENSIONS['toml'] | {'cargo-lock'}, + 'clippy.toml': EXTENSIONS['toml'] | {'clippy'}, 'CMakeLists.txt': EXTENSIONS['cmake'], 'CHANGELOG': EXTENSIONS['txt'], 'config.ru': EXTENSIONS['rb'], From 2f1c3c8575f39a40636291720d598b582c4908ef Mon Sep 17 00:00:00 2001 From: Michael Baumgartner Date: Sun, 21 Sep 2025 13:53:41 +0200 Subject: [PATCH 3/3] Add rust dependencies linter config file Some further linter for rust, but focused on dependencies: https://embarkstudios.github.io/cargo-deny/checks/cfg.html --- identify/extensions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/identify/extensions.py b/identify/extensions.py index ecf6f46..3165c40 100644 --- a/identify/extensions.py +++ b/identify/extensions.py @@ -374,6 +374,7 @@ 'BUILD': EXTENSIONS['bzl'], 'Cargo.toml': EXTENSIONS['toml'] | {'cargo'}, 'Cargo.lock': EXTENSIONS['toml'] | {'cargo-lock'}, + 'deny.toml': EXTENSIONS['toml'] | {'cargo-deny'}, 'clippy.toml': EXTENSIONS['toml'] | {'clippy'}, 'CMakeLists.txt': EXTENSIONS['cmake'], 'CHANGELOG': EXTENSIONS['txt'],