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

Testing & Integrating Code Quality Tooling #5096

Open
jdrueckert opened this issue Apr 10, 2023 · 1 comment
Open

Testing & Integrating Code Quality Tooling #5096

jdrueckert opened this issue Apr 10, 2023 · 1 comment
Labels
Category: Test/QA Requests, Issues and Changes targeting tests and quality assurance Size: M Medium-sized effort likely requiring some research and work in multiple areas Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Type: Improvement Request for or addition/enhancement of a feature

Comments

@jdrueckert
Copy link
Member

jdrueckert commented Apr 10, 2023

Motivation

  • various code quality tools in place, mostly just for information and not blocking anything, aka. not actually enforcing quality
    • CheckStyle (mostly default ruleset, blocking)
    • PMD (mostly default ruleset, non-blocking)
    • SpotBugs (mostly default ruleset, non-blocking)
  • no real overview of the hotspots, criticality, and low hanging fruit of issues in our code base
  • @sfavello suggested Code Climate as a substitute for our old LGTM badges in doc: update README #5095
  • Code Climate, similar to Sonarcloud, is a code quality analysis tool that might help get better insights into the state of our code-base and how to tackle the quality issues we have to enable functional improvements/refactoring with readability, less technical debt, etc.

Proposal

Step 1:

  • Hook up Code Climate Analysis for our PRs
  • Optionally hook up other alternatives such as Sonarcloud
  • Evaluate (optionally compare) the resulting analysis findings
    • true/false positives
    • criticality/severity information
    • detailed information on the identified issue and the problem it poses
    • guidance on how to fix the issue, e.g. code samples, links for further reading, etc.
    • replaceability / overlap with existing tooling

Step 2:

  • Provoke additional issues we want the tooling to be able to find
  • Evaluate (optionally compare) the resulting analysis findings
    • true/false negatives

Step 3:

  • Consider additional requirements such as customizability, ease of setup (ideally can be automated / set up on org-level - necessary for ModuleLand), maintainability (recurring tasks / maintenance load), etc.
  • Decide which tool to integrate
  • Set it up for ModuleLand and other relevant repos as well (e.g. TeraNui, website, launcher, etc)

Definition of Done:

  • Tooling evaluated with respect to true/false positives/negatives, usability, and ease of setup
  • Chosen tooling hooked up for push validation in engine and module repos, as well as any other relevant repo (see above)
  • Configuration adjusted to replace existing tools and any repo-specific intricacies
  • Any necessary maintenance tasks documented in the wiki
  • Existing tools are removed

Concerns / Open Questions

  • no dependencies and no conflicts expected
  • contributor needs some understanding of quality issues that can occur in Java
  • when introducing quality tooling, we need to make sure it doesn't block us until all issues are resolved - ideally a kind of delta approach as in Sonarcloud: newly introduced issues in a PR are blocking, existing issues are flagged but not blocking
  • does the tooling also cover groovy, kotlin, json, etc.? - our code base is not solely Java
  • are there further alternatives we should think about? (if none come to mind, let's just start with code climate and sonarcloud for comparison)

Useful Links

@jdrueckert jdrueckert added Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Size: M Medium-sized effort likely requiring some research and work in multiple areas Type: Improvement Request for or addition/enhancement of a feature Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Category: Test/QA Requests, Issues and Changes targeting tests and quality assurance labels Apr 10, 2023
@soloturn
Copy link
Contributor

soloturn commented Jul 28, 2023

one possibility could be lucas perssons sonarlint gradle plugin:
https://github.com/Lucas3oo/sonarlint-gradle-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Test/QA Requests, Issues and Changes targeting tests and quality assurance Size: M Medium-sized effort likely requiring some research and work in multiple areas Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Type: Improvement Request for or addition/enhancement of a feature
Projects
Status: Backlog
Development

No branches or pull requests

2 participants