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

feat(ci): add eslint to reviewdog #12713

Merged
merged 2 commits into from Jun 23, 2022

Conversation

Neudrino
Copy link
Contributor

@Neudrino Neudrino commented May 13, 2022

Summary

eslint is used in the JavaScript universe and specifically for the NMS frontend in magma.
This integrates the linter with reviewdog for a visual feedback in Github.

The change to the yarn package install is necessary, because otherwise the npm install step fails in CI. yarn.lock automatically updated by running yarn.

Test Plan

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines. label May 13, 2022
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added component: ci All updates on CI (Jenkins/CircleCi/Github Action) component: nms NMS-related issue labels May 13, 2022
@magma magma deleted a comment from github-actions bot May 13, 2022
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines. and removed size/S Denotes a PR that changes 10-29 lines. labels May 13, 2022
@magma magma deleted a comment from github-actions bot May 13, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 13, 2022

nms-workflow

0 files  0 suites   0s ⏱️
0 tests 0 ✔️ 0 💤 0

Results for commit 3e864ca.

♻️ This comment has been updated with latest results.

@Neudrino Neudrino marked this pull request as ready for review May 13, 2022 13:19
@Neudrino Neudrino requested a review from a team May 13, 2022 13:19
@Neudrino Neudrino requested a review from a team as a code owner May 13, 2022 13:19
@Neudrino Neudrino requested review from jheidbrink and removed request for nstng May 13, 2022 13:29
Signed-off-by: Fritz Lehnert <13189449+Neudrino@users.noreply.github.com>
Signed-off-by: Fritz Lehnert <13189449+Neudrino@users.noreply.github.com>
@@ -117,7 +117,7 @@
"prettier": "^2.0.5",
"puppeteer": "5.5.0",
"react-hot-loader": "^4.8.0",
"react-test-renderer": "^17.0.2",
"react-test-renderer": "^16.9.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, we should use a test renderer that fits to our react version.

@@ -113,6 +116,26 @@ jobs:
# Ignore DL3005-"Do not use apt-get upgrade or dist-upgrade"
hadolint_ignore: DL3005

eslint:
Copy link
Contributor

Choose a reason for hiding this comment

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

Does that mean we are now running eslint twice once as part of the nms workflow and ones in the reviewdog workflow?

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 is correct. However, I do not see an issue with that, as it will be run in parallel and thus not prolong the CI execution.
I would see this as first step in part of a larger consolidation of the CI, in this part of linters and formatters.
Anyhow, for now, it brings the advantage that people opening a PR see in the PR conversation, what issues the Linter shows, instead of only having those hidden in the run logs of the action.

@Neudrino Neudrino merged commit 388539a into magma:master Jun 23, 2022
@Neudrino Neudrino deleted the ci/reviewdog-for-eslint branch June 23, 2022 07:36
emakeev pushed a commit to emakeev/magma that referenced this pull request Aug 5, 2022
* feat(ci): add eslint to reviewdog

Signed-off-by: Fritz Lehnert <13189449+Neudrino@users.noreply.github.com>

* feat(ci): pin react-test-renderer version

Signed-off-by: Fritz Lehnert <13189449+Neudrino@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ci All updates on CI (Jenkins/CircleCi/Github Action) component: nms NMS-related issue size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants