Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Add a CI pipeline to check for build errors and Java style guide violations #38

Closed
CrsiX opened this issue May 28, 2021 · 4 comments · Fixed by #43
Closed

Add a CI pipeline to check for build errors and Java style guide violations #38

CrsiX opened this issue May 28, 2021 · 4 comments · Fixed by #43
Labels
enhancement New feature or request

Comments

@CrsiX
Copy link
Collaborator

CrsiX commented May 28, 2021

Considering EiST with their exercise point reductions for bad code style... I would suggest to add a CI pipeline (e.g. Travis CI) to accomplish the following goals on our test suite(s):

  • Prevent Java build errors
  • Point out bad practices to avoid them later on
  • Improve general coding style
  • Encourage other students to adapt the idea of testing their own projects in this or similar way as well

After a quick search, there are some style guides around, e.g. this one from Google or this draft for OpenJDK (or this very old PDF document from Oracle?). From a quick point of overview, they seem to be quiet abstract but also consistent.

But that's not of particular interest now. The questions are: Do we need it at all? What tools should be used (if we agree on that)? I'm open for further discussion. :)

@CrsiX CrsiX added the enhancement New feature or request label May 28, 2021
@JohannesStoehr
Copy link

You might want to use this as a baseline: https://github.com/ls1intum/Artemis/tree/develop/src/main/resources/templates/java/test/staticCodeAnalysisConfig
These are the style guides that Artemis uses, when evaluating your submissions

@CrsiX
Copy link
Collaborator Author

CrsiX commented May 28, 2021

You might want to use this as a baseline: https://github.com/ls1intum/Artemis/tree/develop/src/main/resources/templates/java/test/staticCodeAnalysisConfig

Thanks for the input. However, the pure config data isn't helpful on its own. What software uses this configuration? The bamboo server? This can't be used here I guess.

When nobody disagrees with the proposal, I would dive into GitHub Actions to accomplish this soon.

@JohannesStoehr
Copy link

This is used by Bamboo and run using Maven to run Spotbugs, PMD and Checkstyle. But at least some of them should also be available as GitHubActions afaik

@N0W0RK
Copy link
Owner

N0W0RK commented May 31, 2021

Just googled a bit and found this on GH Marketplace. Might be worth a look if you haven't found anything better.

N0W0RK added a commit that referenced this issue Jun 1, 2021
- Add Checkstyle action on PR (closes #38)
@N0W0RK N0W0RK mentioned this issue Jun 1, 2021
@N0W0RK N0W0RK closed this as completed in #43 Jun 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants