no_submodules
Flag the presence of .gitmodules at the repo root — always, regardless of paths. For general “file X must not exist” checks, use file_absent.
Note the fix only deletes .gitmodules; git submodule deinit and cleaning .git/modules/ are still on the user.
Options
Section titled “Options”This rule takes no kind-specific options.
Plus the common level, id, and when fields. This rule analyses the whole repository, so it takes no paths. This table is generated from the JSON Schema; option types and defaults are authoritative.
Example
Section titled “Example”A repo that declares a git submodule
Section titled “A repo that declares a git submodule”The rule fires on this repository:
.gitmodulesREADME.mdvendor/vendor/lib/vendor/lib/.keep[submodule "vendor/lib"] path = vendor/lib url = https://example.com/lib.git# demoWith this .alint.yml:
version: 1rules: - id: no-submods kind: no_submodules level: erroralint check reports:
--- .gitmodules ---------------------------------------------------------------- x error no-submods `.gitmodules` present - git submodules are forbidden
Summary (1 violation): x 1 error 0 passing * 1 failingA repo with no submodules declared
Section titled “A repo with no submodules declared”This repository is compliant:
.gitignoreREADME.mdsrc/src/main.rs/target# demofn main() {}With this .alint.yml:
version: 1rules: - id: no-submods kind: no_submodules level: erroralint check reports:
v All 1 rule(s) passed.