-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lint): add textlint for natural language lint (#21815)
- Loading branch information
1 parent
b9da15e
commit b37bdea
Showing
12 changed files
with
2,500 additions
and
140 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 |
---|---|---|
|
@@ -23,6 +23,7 @@ jobs: | |
json: ${{ steps.filter.outputs.json }} | ||
markdown: ${{ steps.filter.outputs.markdown }} | ||
matlab: ${{ steps.filter.outputs.matlab }} | ||
natural-language: ${{ steps.filter.outputs.natural-language }} | ||
python: ${{ steps.filter.outputs.python }} | ||
qml: ${{ steps.filter.outputs.qml }} | ||
ruby: ${{ steps.filter.outputs.ruby }} | ||
|
@@ -122,6 +123,54 @@ jobs: | |
- 'pyproject.toml' | ||
- 'uv.lock' | ||
- '**/*.m' | ||
natural-language: | ||
- '.github/workflows/.lint.yml' | ||
- '.node-version' | ||
- '.npmrc' | ||
- 'package.json' | ||
- 'package-lock.json' | ||
- '.textlintrc.json' | ||
- '.textlintignore' | ||
- '**/*.c' | ||
- '**/*.cjs' | ||
- '**/*.cpp' | ||
- '**/*.cs' | ||
- '**/*.csproj' | ||
- '**/*.dbc' | ||
- '**/*.go' | ||
- '**/*.gradle' | ||
- '**/*.h' | ||
- '**/*.ino' | ||
- '**/*.ipynb' | ||
- '**/*.java' | ||
- '**/*.jl' | ||
- '**/*.js' | ||
- '**/*.json' | ||
- '**/*.kt' | ||
- '**/*.kts' | ||
- '**/*.m' | ||
- '**/*.md' | ||
- '**/*.mjs' | ||
- '**/*.p4' | ||
- '**/*.py' | ||
- '**/*.rego' | ||
- '**/*.rs' | ||
- '**/*.scad' | ||
- '**/*.scala' | ||
- '**/*.sh' | ||
- '**/*.sln' | ||
- '**/*.sol' | ||
- '**/*.sql' | ||
- '**/*.swift' | ||
- '**/*.tf' | ||
- '**/*.toml' | ||
- '**/*.ts' | ||
- '**/*.tsx' | ||
- '**/*.vhd' | ||
- '**/*.WizardFile' | ||
- '**/*.xml' | ||
- '**/*.yaml' | ||
- '**/*.yml' | ||
ruby: | ||
- '.github/workflows/.lint.yml' | ||
- 'Gemfile' | ||
|
@@ -729,6 +778,29 @@ jobs: | |
run: | | ||
uv run poe lint-matlab | ||
lint-natural-language: | ||
name: Natural Language | ||
needs: detect-changes | ||
if: ${{ needs.detect-changes.outputs.natural-language == 'true' }} | ||
runs-on: ubuntu-24.04 | ||
environment: test | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Set up Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version-file: .node-version | ||
cache: npm | ||
cache-dependency-path: package-lock.json | ||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
- name: Lint natural language | ||
run: | | ||
npm run lint:natural-language | ||
lint-protocol-buffers-api-go: | ||
name: Protocol Buffers (api-go) | ||
needs: detect-changes | ||
|
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
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,151 @@ | ||
# https://textlint.github.io/docs/ignore.html#ignoring-files-textlintignore | ||
|
||
# Anywhere (Folder mush have trailing /**/*) | ||
**/*.aliases | ||
**/*.asv | ||
**/*.cache | ||
**/*.cf | ||
**/*.DotSettings.user | ||
**/*.ghw | ||
**/*.iml | ||
**/*.lvlps | ||
**/*.mexmaca64 | ||
**/*.mexmaci64 | ||
**/*.slxc | ||
**/*.swc/**/* | ||
**/*.tfstate | ||
**/*.unsealed.yaml | ||
**/.DS_Store | ||
**/*.duckdb | ||
**/.env.development.local | ||
**/.env.production.local | ||
**/.gitkeep | ||
**/.idea/**/* | ||
**/.pytest_cache/**/* | ||
**/.ruff_cache/**/* | ||
**/.terraform/**/* | ||
**/.vagrant/**/* | ||
**/.venv/**/* | ||
**/.vscode/**/* | ||
**/__pycache__/**/* | ||
**/build/**/* | ||
**/cmake-build-debug/**/* | ||
**/codegen/**/* | ||
**/coverage/**/* | ||
**/node_modules/**/* | ||
**/slprj/**/* | ||
**/target/**/* | ||
|
||
# Root (Must have leading ./; Folder mush have trailing /**/*) | ||
/.aider.chat.history.md | ||
/.aider.tags.cache.v3/**/* | ||
./.git/**/* | ||
./.github/**/* | ||
./.mypy_cache/**/* | ||
./build-desktop-qt-Qt_6_4_1_for_macOS-Debug/**/* | ||
./dump.rdb | ||
./logs/**/* | ||
./logs.log | ||
./submodules/**/* | ||
./vendor/**/* | ||
./west-master-k3s.yaml | ||
|
||
# Directories (Folder mush have trailing /**/*) | ||
aerospace/hm-openaerostruct/reports/**/* | ||
aerospace/hm-openaerostruct/n2.html | ||
api-go/config/config_loader/server.crt | ||
api-go/config/config_loader/server.key | ||
api-go/config/config_loader/opal_auth_public_key.pem | ||
api-go/coverage.txt | ||
api-node/.clinic/**/* | ||
api-node/.stryker-tmp/**/* | ||
api-node/public/**/* | ||
api-node/reports/**/* | ||
api-python/dist/**/* | ||
api-rust/models/**/* | ||
caddy/public/**/* | ||
cloud-cost/komiser/komiser.db | ||
cloud-infrastructure/hm-pulumi/passphrase.txt | ||
cloud-infrastructure/terraform/environments/production/aws/data/files/amazon-msk/*/plugins/*.zip | ||
cloud-platform/aws/aws-secrets-manager/secrets/*-credentials.json | ||
cloud-security/hm-prowler/output/**/* | ||
computational-fluid-dynamics/openfoam/simulations/*/0.*/**/* | ||
computational-fluid-dynamics/openfoam/simulations/*/constant/polyMesh/**/* | ||
data-analytics/hm-geopandas/data/**/* | ||
data-ingestion/fluent-bit/*/data/**/* | ||
data-ingestion/vector/*/data/**/* | ||
data-orchestration/hm-prefect/workflows/*/*-deployment.yaml | ||
data-orchestration/hm-prefect/workflows/*/.coverage/**/* | ||
data-orchestration/hm-prefect/workflows/*/coverage.xml | ||
data-processing/flink/applications/*/.classpath | ||
data-processing/flink/applications/*/.project | ||
data-processing/flink/applications/*/.settings/**/* | ||
data-processing/flink/applications/*/dependency-reduced-pom.xml | ||
data-processing/flink/applications/*/src/main/resources/*.properties | ||
data-processing/hm-spark/applications/*/.bsp/**/* | ||
data-processing/hm-spark/applications/*/data/**/* | ||
data-storage/hm-keydb/dump.rdb | ||
data-storage/hm-keydb/modules/**/* | ||
data-storage/hm-protobuf/data/**/* | ||
data-transformation/dbt/projects/*/dbt_packages/**/* | ||
data-transformation/dbt/projects/*/logs/**/* | ||
data-visualization/grafana/hm-panel-plugin/.config/**/* | ||
data-visualization/metabase/plugins/**/* | ||
desktop-qt/CMakeLists.txt.user | ||
embedded/decode-can-data/data/**/* | ||
hardware-in-the-loop/national-instruments/hm-tdms/data/**/* | ||
hardware-in-the-loop/national-instruments/veristand/VeriStandZeroMQBridge/packages/**/* | ||
hardware-in-the-loop/national-instruments/veristand/VeriStandZeroMQBridge/VeriStandZeroMQBridge/bin/**/* | ||
hardware-in-the-loop/national-instruments/veristand/VeriStandZeroMQBridge/VeriStandZeroMQBridge/obj/**/* | ||
hm-kafka/kafka-client/kafka-c/*/config.ini | ||
kubernetes/certificates/**/* | ||
kubernetes/data/config-loader/**/* | ||
kubernetes/data/elastic-apm/**/* | ||
kubernetes/data/hasura/hasura-graphql-engine/**/* | ||
kubernetes/data/hm-alpine/**/* | ||
kubernetes/data/hm-kafka/hm-kafka/**/* | ||
kubernetes/data/hm-kafka/logging-kafka-connect/**/* | ||
kubernetes/data/hm-kafka/opa-kafka-connect/**/* | ||
kubernetes/data/minio/**/* | ||
kubernetes/data/model-server/model-store/**/* | ||
kubernetes/data/opal-server/**/* | ||
kubernetes/data/yugabyte/**/* | ||
kubernetes/manifests-raw/**/* | ||
machine-learning/convolutional-neural-network/output/models/**/* | ||
machine-learning/convolutional-neural-network/output/reports/**/* | ||
machine-learning/convolutional-neural-network/wandb/**/* | ||
machine-learning/feature-store/driver_features/data/**/* | ||
machine-learning/graph-neural-network/dataset/**/* | ||
machine-learning/graph-neural-network/wandb/**/* | ||
machine-learning/hm-autogluon/AutogluonModels/**/* | ||
machine-learning/hm-langchain/applications/*/data/**/* | ||
machine-learning/hm-mlflow/experiments/*/data/**/* | ||
machine-learning/hm-mlflow/experiments/*/lightning_logs/**/* | ||
machine-learning/hm-mlflow/experiments/*/mlruns/**/* | ||
machine-learning/hm-mlflow/experiments/*/wandb/**/* | ||
machine-learning/hm-rasa/.rasa/**/* | ||
machine-learning/hm-rasa/graph.html | ||
machine-learning/hm-rasa/models/**/* | ||
machine-learning/hm-rasa/results/**/* | ||
machine-learning/hm-rasa/story_graph.dot | ||
machine-learning/hm-supervision/*/data/**/* | ||
machine-learning/neural-forecasting/*/lightning_logs/**/* | ||
machine-learning/triton/amazon-sagamaker-triton-resnet-50/infer/data/**/* | ||
mobile/mobile-android/.gradle/**/* | ||
mobile/mobile-android/local.properties | ||
mobile/mobile-ios/HMMobile.xcodeproj/project.xcworkspace/**/* | ||
mobile/mobile-ios/HMMobile.xcodeproj/xcuserdata/**/* | ||
mobile/mobile-react-native/.expo/**/* | ||
reverse-engineering/*/main | ||
robotics/robot-operating-system/bags/**/* | ||
robotics/robot-operating-system/install/**/* | ||
robotics/robot-operating-system/log/**/* | ||
spark/project/target/**/* | ||
spark/target/**/* | ||
web-cypress/cypress/fixtures/example.json | ||
web-cypress/cypress/screenshots/**/* | ||
web/.eslintcache | ||
web/.lighthouseci | ||
web/public/sitemap.xml | ||
web/storybook-static/**/* | ||
web/tmp/**/* |
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,51 @@ | ||
{ | ||
"plugins": { | ||
"@textlint/text": { | ||
"extensions": [ | ||
".c", | ||
".cjs", | ||
".cpp", | ||
".cs", | ||
".csproj", | ||
".dbc", | ||
".go", | ||
".gradle", | ||
".h", | ||
".ino", | ||
".ipynb", | ||
".java", | ||
".jl", | ||
".js", | ||
".json", | ||
".kt", | ||
".kts", | ||
".m", | ||
".md", | ||
".mjs", | ||
".p4", | ||
".py", | ||
".rego", | ||
".rs", | ||
".scad", | ||
".scala", | ||
".sh", | ||
".sln", | ||
".sol", | ||
".sql", | ||
".swift", | ||
".tf", | ||
".toml", | ||
".ts", | ||
".tsx", | ||
".vhd", | ||
".WizardFile", | ||
".xml", | ||
".yaml", | ||
".yml" | ||
] | ||
} | ||
}, | ||
"rules": { | ||
"textlint-rule-common-misspellings": true | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
|
||
figure(h_fig); | ||
if strcmp(view, 'sep') | ||
% Plot seperate | ||
% Plot separate | ||
|
||
for i = 1:3 | ||
subplot(3, 1, i); | ||
|
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
2 changes: 1 addition & 1 deletion
2
...n-the-loop/national-instruments/veristand/VeriStandZeroMQBridge/VeriStandZeroMQBridge.sln
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
2 changes: 1 addition & 1 deletion
2
...uments/veristand/VeriStandZeroMQBridge/VeriStandZeroMQBridge/VeriStandZeroMQBridge.csproj
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
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 |
---|---|---|
|
@@ -76,7 +76,7 @@ nlu: | |
- unhappy | ||
- not good | ||
- not very good | ||
- extremly sad | ||
- extremely sad | ||
- so saad | ||
- so sad | ||
|
Oops, something went wrong.