Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check format with prettier before build #4567

Merged
merged 6 commits into from
Feb 13, 2024
Merged

Check format with prettier before build #4567

merged 6 commits into from
Feb 13, 2024

Conversation

vdiez
Copy link
Contributor

@vdiez vdiez commented Feb 12, 2024

Until now, we were formatting the source code during build task, so we were not able to detect unformatted code. This adds back the format check before building the plugin

Fixes #4465

.cirrus.yml Outdated
@@ -116,6 +116,8 @@ build_task:
<<: *NPMRC_SCRIPT_DEFINITION
build_and_deploy_script:
- source cirrus-env BUILD
- npm run bbf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to run the build before?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also I would avoid using shortcut in CI script, we can "afford" to have a long name here for clarity

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, we don't... I will replace by npm ci

.cirrus.yml Outdated
@@ -116,6 +116,8 @@ build_task:
<<: *NPMRC_SCRIPT_DEFINITION
build_and_deploy_script:
- source cirrus-env BUILD
- npm ci
- npx prettier --list-different .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removing check-format? imo I would prefer to be consistent and only use package.json scripts here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what I understood by:

also I would avoid using shortcut in CI script, we can "afford" to have a long name here for clarity

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@saberduck saberduck merged commit 92d5b7b into master Feb 13, 2024
17 checks passed
@saberduck saberduck deleted the check-format branch February 13, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not npm run format in CI. Instead, use check-format again.
2 participants