Skip to content

Add a rule to check for non-private instance fields - #1891

Merged
uhafner merged 1 commit into
mainfrom
only-private-fields
Jun 4, 2026
Merged

Add a rule to check for non-private instance fields#1891
uhafner merged 1 commit into
mainfrom
only-private-fields

Conversation

@uhafner

@uhafner uhafner commented Jun 3, 2026

Copy link
Copy Markdown
Owner

One important consequence of information hiding is to make fields of classes always private. This should be enforced with an architecture rule.

@uhafner uhafner added the tests Enhancement of tests label Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

☀️   Quality Monitor

Tests

   JUnit   Unit Tests: ✅ successful — 87 passed $\textsf{(±0)}$, 2 skipped $\textsf{(±0)}$
   ⛔   Architecture Tests: ✅ successful — 18 passed $\color{green}{\textsf{(+1)}}$, 2 skipped $\textsf{(±0)}$

Coverage for New Code

   〰️   Line Coverage: 100.00% — perfect 🎉
   ➰   Branch Coverage: 100.00% — perfect 🎉
   PIT   Mutation Coverage: 100.00% — perfect 🎉
   💪   Test Strength: 100.00% — perfect 🎉

Coverage for Whole Project

   〰️   Line Coverage: 92.03% $\textsf{(±0)}$ — 64 missed lines
   ➰   Branch Coverage: 92.04% $\textsf{(±0)}$ — 18 missed branches
   PIT   Mutation Coverage: 91.16% $\textsf{(±0)}$ — 29 survived mutations
   💪   Test Strength: 93.15% $\textsf{(±0)}$ — 22 survived mutations in tested code

Style

   CheckStyle   CheckStyle: No warnings $\textsf{(±0)}$
   PMD   PMD: No warnings $\textsf{(±0)}$
   ☕   Java Compiler: No warnings $\textsf{(±0)}$

Bugs

   SpotBugs   SpotBugs: No bugs $\textsf{(±0)}$
   🐛   Error Prone: No bugs $\textsf{(±0)}$

API Problems

   🚫   Revapi: No warnings $\textsf{(±0)}$

Vulnerabilities

   🛡️   OWASP Dependency Check: No vulnerabilities $\textsf{(±0)}$

Software Metrics

   🌀   Cyclomatic Complexity: 397 (total)
   💭   Cognitive Complexity: 173 (total)
   ➿   N-Path Complexity: 361 (total)
   📏   Lines of Code: 4722 (total)
   📝   Non Commenting Source Statements: 1338 (total)
   🔗   Class Cohesion: 71.43% (maximum)
   ⚖️   Weight of Class: 100.00% (maximum)

📌 Reference Results

Delta reports computed against the reference results of e2cc757 in workflow run 26908169672.

🚦 Quality Gates

Overall Status: ✅ SUCCESS

✅ Passed Gates

  • ✅ Overall Tests Success Rate: 100.00 >= 100.00
  • ✅ Line Coverage in New Code: 100.00 >= 90.00
  • ✅ Branch Coverage in New Code: 100.00 >= 90.00
  • ✅ Mutation Coverage in New Code: 100.00 >= 90.00
  • ✅ Potential Bugs in Whole Project: 0.00 <= 0.00
  • ✅ Style Violation in Whole Project: 0.00 <= 0.00

Created by Quality Monitor v4.15.0 (#82d77af). More details are shown in the GitHub Checks Result.

@uhafner
uhafner merged commit 6a95430 into main Jun 4, 2026
15 of 16 checks passed
@uhafner
uhafner deleted the only-private-fields branch June 4, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Enhancement of tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant