Skip to content

Commit

Permalink
Add openapi linting to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Sgtpluck committed Dec 30, 2024
1 parent abd7fc8 commit 9542a03
Show file tree
Hide file tree
Showing 3 changed files with 828 additions and 17 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ endif
make lint_spec_file_name
@echo "--- lint migrations ---"
make lint_migrations
@echo "--- lint openapi spec ---"
make lint_openapi

audit: ## Checks packages for vulnerabilities
@echo "--- bundler-audit ---"
Expand Down Expand Up @@ -178,6 +180,9 @@ lint_spec_file_name:
-exec false {} + \
-exec echo "Error: Spec files named incorrectly, should end in '.spec.(js|ts|jsx|tsx)':" {} +

lint_openapi:
@yarn lint:openapi

lintfix: ## Try to automatically fix any Ruby, ERB, JavaScript, YAML, or CSS lint errors
@echo "--- rubocop fix ---"
bundle exec rubocop -a
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"typecheck": "tsc",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"lint:css": "stylelint 'app/assets/stylesheets/**/*.scss' 'app/javascript/**/*.scss' 'app/components/*.scss'",
"lint:openapi": "redocly lint ./docs/attempts-api/openapi.yml",
"test": "mocha 'spec/javascript/**/**spec.+(j|t)s?(x)' 'app/javascript/packages/**/*.spec.+(j|t)s?(x)'",
"normalize-yaml": "normalize-yaml",
"generate-browsers-json": "./scripts/generate-browsers-json.js",
Expand Down Expand Up @@ -84,6 +85,7 @@
"msw": "^2.6.5",
"prettier": "^3.1.0",
"quibble": "^0.9.1",
"@redocly/cli": "^1.22.22",
"react-test-renderer": "^17.0.2",
"sinon": "^14.0.0",
"sinon-chai": "^3.7.0",
Expand Down
Loading

0 comments on commit 9542a03

Please sign in to comment.