diff --git a/.github/fluent_linter_config.yml b/.github/fluent_linter_config.yml new file mode 100644 index 00000000..1b33942f --- /dev/null +++ b/.github/fluent_linter_config.yml @@ -0,0 +1,28 @@ +--- +ID01: + enabled: true + exclusions: + messages: [] + files: [] +ID02: + enabled: true + min_length: 7 +VC: + disabled: true +# Disable: # TE01: single quote instead of apostrophe for genitive (foo's) +TE01: + enabled: false +# TE03: single quotes ('foo') +TE03: + enabled: false +# TE04: Double-quoted strings should use Unicode " instead of "foo". +TE04: + enabled: false +# Disable: TE05: 3 dots for ellipsis ("...") +TE05: + enabled: false +# Should be fixed +VC01: + disabled: true +ID03: + enabled: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..872752f0 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.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/mozilla-l10n/moz-fluent-linter + rev: v0.4.8 + hooks: + - id: fluent_linter + files: \.ftl$ + args: [--config, .github/fluent_linter_config.yml, src/uu/]