CI: run SonarCloud analysis on PRs (Clean-as-You-Code) to catch new S3415 and similar regressions
Los mantenedores suelen responder en 1 día
@milamberspace ya está trabajando en esto.
Desde el 10/7/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Context
#6718 fixed ~90 occurrences of SonarQube rule java:S3415 ("assertion arguments passed in the wrong order" — assertEquals(actual, expected) instead of assertEquals(expected, actual)) across the test suite.
These accumulated because SonarCloud analysis currently runs out-of-band — a nightly report to https://sonarcloud.io/dashboard?id=JMeter via the org.sonarqube Gradle plugin — not as a per-PR check. So nothing flags a new violation when a PR introduces one.
Opening this per the discussion on #6718 (@vlsi asked whether we can add something to avoid re-introducing this type of error).
Options (rough order of effort)
1. Add SonarCloud PR analysis to the GitHub Actions CI (preferred).
The org.sonarqube plugin is already wired (org apache, project JMeter); the missing piece is a sonar step on the PR workflow plus SonarCloud's "Clean as You Code" quality gate, which fails a PR that introduces a new violation. This directly targets S3415 (and every other Sonar rule) at review time. S3415 is heuristic (name-based — it fires when a literal/constant sits in the "actual" slot), so it catches the common cases, not 100%.
2. Error Prone ArgumentSelectionDefectChecker.
Error Prone already runs in CI (the "Error Prone (JDK 21)" job), so this is the cheapest to trial. It can flag swapped variables whose names don't match the expected / actual parameters, but is unreliable for literals. Evaluate signal vs. noise before promoting it to an error.
3. AssertJ migration (largest, most durable).
assertThat(actual).isEqualTo(expected) removes the ambiguity by construction — there's no "which arg is expected?" left to get wrong. A big, separate effort, but it eliminates the whole class of bug instead of policing it.
Notes
- SonarCloud PR analysis needs a
SONAR_TOKEN(orgapache) available to the workflow — coordinate with ASF Infra / the existing nightly setup, and mind that PR analysis from forks needs apull_request_target-style flow or the token exposed safely. - Related PR: #6718 (the fix that surfaced this).
- Lenguaje dominante
- Java
- Estrellas
- 9.6k
- Forks
- 2.3k
- Merge medio
- 20 h 42 min
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/jmeter
-
[Bug] Typo in assertion property name: "Asserion.test_strings" missing 't'Posiblemente ocupada @waterWang la tomó hace 58 días. Abiertodefect to-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
apache/jmeter#6751 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
RandomDate ignores inclusive end date and throws when start == endPosiblemente ocupada @weillercarvalho la tomó hace 335 días. Abiertodefect to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/jmeter#6609 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
documentation to-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
invalid wontfix
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
apache/jmeter#5770 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/jmeter
Issues similares
-
pdfium-drift
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Stirling-Tools/JPDFium#176 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
hiero-ledger/hiero-consensus-node#27712 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
Vakore/ZappierGames#162 ·
-
Improve README documentation clarity and fix minor wording issuesPosiblemente ocupada @simplesilence la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
resilience4j/resilience4j#2567 ·
Los mantenedores suelen responder en 6 días
-
Priority/High
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
wso2/dpdp-accelerator#417 ·
Los mantenedores suelen responder en 1 día