Skip to content

Commit

Permalink
Check format with prettier before build (#4567)
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez authored Feb 13, 2024
1 parent 13cc668 commit 92d5b7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ build_task:
<<: *NPMRC_SCRIPT_DEFINITION
build_and_deploy_script:
- source cirrus-env BUILD
- npm ci
- npm run check-format
- npm run build
- regular_mvn_build_deploy_analyze -Dmaven.test.skip=true -Dmaven.install.skip=true -Dsonar.skip=true
cleanup_before_cache_script: cleanup_maven_repository
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "SonarJS code analyzer",
"scripts": {
"format": "prettier --write .",
"check-format": "prettier --list-different .",
"build": "mvn clean && npm run _:plugin:pre-build && npm run plugin:build-no-bridge && npm run update-ruling-data",
"build:fast": "npm run bridge:build:fast && npm run _:plugin:prepare-bridge && npm run _:plugin-fetch-node && npm run plugin:build:fast && npm run update-ruling-data",
"bf": "npm run build:fast",
Expand All @@ -14,7 +15,7 @@
"bridge:compile": "tsc -b packages profiling",
"bridge:test": "jest --maxWorkers=40% --coverage --testPathIgnorePatterns=/packages/ruling/tests/",
"bridge:build": "npm run bridge:build:fast && npm run bridge:test",
"bridge:build:fast": "npm ci && npm run format && npm run _:bridge:clear && npm run bridge:compile",
"bridge:build:fast": "npm ci && npm run _:bridge:clear && npm run bridge:compile",
"bbf": "npm run bridge:build:fast",
"plugin:build-no-bridge": "mvn install",
"plugin:build:fast": "npm run plugin:build-no-bridge -- -DskipTests",
Expand Down

0 comments on commit 92d5b7b

Please sign in to comment.