-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to lint Fluent en-US files
- Loading branch information
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
# See https://github.com/mozilla-l10n/moz-fluent-linter/blob/main/src/fluent_linter/config.yml | ||
# for details | ||
|
||
--- | ||
ID01: | ||
enabled: true | ||
exclusions: | ||
messages: [] | ||
files: [] | ||
ID02: | ||
enabled: true | ||
min_length: 9 | ||
exclusions: | ||
messages: [] | ||
files: [] | ||
CO01: | ||
enabled: true | ||
brands: | ||
- Firefox | ||
- Mozilla | ||
exclusions: | ||
files: [] | ||
messages: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
moz-fluent-linter==0.4.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Lint Fluent Reference Files | ||
on: | ||
push: | ||
paths: | ||
- 'l10n/en-US/**.ftl' | ||
- '.github/fluent_linter_config.yml' | ||
- '.github/workflows/fluent_linter.yaml' | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- 'l10n/en-US/**.ftl' | ||
- '.github/fluent_linter_config.yml' | ||
- '.github/workflows/fluent_linter.yaml' | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install Python dependencies | ||
run: | | ||
pip install -r .github/requirements.txt | ||
- name: Lint reference | ||
run: | | ||
moz-fluent-lint ./l10n/en-US --config .github/linter_config.yml |