Skip to content

chore: add static analysis to award service#22

Merged
scottgerring merged 6 commits into
mainfrom
chore/award-static-analysis
Jun 12, 2025
Merged

chore: add static analysis to award service#22
scottgerring merged 6 commits into
mainfrom
chore/award-static-analysis

Conversation

@scottgerring

@scottgerring scottgerring commented Jun 5, 2025

Copy link
Copy Markdown
Member

Add CheckStyle for linting and Spotless for applying formatting.


FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble-chiseled AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Quality Violation

package curl should have version pinned (...read more)

When using apt-get install, pin the version to avoid unwanted upgrades and undefined behavior.

View in Datadog  Leave us feedback  Documentation

// Constructor with fields
public Sticker(String stickerId, String name, String description, String imageUrl, Integer stickerQuantityRemaining) {
/** Default constructor for JPA. */
public Sticker() {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Quality Violation

Consider adding super() or this() to your constructor (...read more)

In Java, it is suggested to call super() in an extended class. This rule will report a violation if both a call to super() and an overloaded constructor are absent.

View in Datadog  Leave us feedback  Documentation

/** Integration test for StickerAwardResource. */
@QuarkusTest
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class StickerAwardResourceIT {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Quality Violation

The name StickerAwardResourceIT does not follow the regex: /^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$/ (...read more)

Enforce a specific naming convention for your classes using custom regexes that allow for customizing the regex per class type, such as, an enum, interface or even abstract classes.

By default, this rule enforces the Pascal case (PascalCase) naming convention.

This rule also verifies the names for test classes if the class includes a @Test annotation.

View in Datadog  Leave us feedback  Documentation

}

// Constructor with fields
public StickerAssignment() {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Quality Violation

Consider adding super() or this() to your constructor (...read more)

In Java, it is suggested to call super() in an extended class. This rule will report a violation if both a call to super() and an overloaded constructor are absent.

View in Datadog  Leave us feedback  Documentation

@scottgerring scottgerring force-pushed the chore/award-static-analysis branch from d32a9c6 to 213da8f Compare June 5, 2025 12:51
@jeastham1993

Copy link
Copy Markdown
Collaborator

@scottgerring is this ready to review? It looks like there is some crossover with the last PR? #21

@scottgerring

Copy link
Copy Markdown
Member Author

@jeastham1993 it is, it's just based off of the same commit the integration tests hang from. once that's merged they'll disappear here and you'll only see the actual change.

I'd suggest looking at the PR commit-by-commit anyway, as it's a combo of "add tool" and then "clean up for tool", which is rather noisy looked at in aggregate.

@jeastham1993 jeastham1993 self-requested a review June 12, 2025 13:39

@jeastham1993 jeastham1993 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@scottgerring scottgerring force-pushed the chore/award-static-analysis branch from d64ddbd to df793e9 Compare June 12, 2025 14:14
@scottgerring scottgerring merged commit 1e05029 into main Jun 12, 2025
9 checks passed
@scottgerring scottgerring deleted the chore/award-static-analysis branch June 12, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants