Repository navigation
Conversation
| public static final String EXECUTABLE_ENVIRONMENT = "SEMSITTER_ANALYZER"; | ||
| public static final String CLIENT_ID_ENVIRONMENT = "SONAR_JAVA_LAUNCHDARKLY_CLIENT_ID"; | ||
| static final boolean FLAG_DEFAULT = false; | ||
| static final boolean FLAG_DEFAULT = true; |
There was a problem hiding this comment.
💡 Quality: Failure log and Javadoc still say the default frontend is used
Now that FLAG_DEFAULT is true, isFlagOn returns true when LaunchDarkly can't be reached (line 90), so SemSitter is the frontend that runs. The warning on line 89 still says "the default frontend is used", which is the opposite of what happens. The class Javadoc (line 35) also still says "Anything that goes wrong while asking leaves the default frontend in use". Anyone reading the logs or the docs during a ruling or CI run will get the wrong idea about which parser handled the analysis. The test name without_property_nor_client_id_the_default_frontend_stays (test line 111) has the same problem, since with no client id the provider now turns SemSitter on. Fix: build the log message and Javadoc from FLAG_DEFAULT, or reword them to be neutral, and rename the test.
Make the warning match what actually happens, whatever the default value is:
LOG.warn("The SemSitter frontend flag could not be read, it defaults to {}: {}", FLAG_DEFAULT ? "on" : "off", e.getMessage());
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
This comment has been minimized.
This comment has been minimized.
088ea84 to
d79893d
Compare
d79893d to
6bba146
Compare
6bba146 to
b655d0a
Compare
|
/pvf |
|
📊 Performance Validation complete Projects with unexpected PVF results:
|
439646f to
4db55e1
Compare
|
/pvf |
|
📊 Performance Validation complete Projects with unexpected PVF results:
|
1469939 to
721888f
Compare
721888f to
32b76cf
Compare
|
/pvf |
|
📊 Performance Validation complete |
32b76cf to
a010d0f
Compare
|
/pvf |
|
Projects with unexpected PVF results:
|
1 similar comment
|
Projects with unexpected PVF results:
|
|
/pvf |
|
📊 Performance Validation complete |
…xecutable is known The flag default flips to on, so an analysis with a SemSitter executable parses with SemSitter unless the flag or sonar.java.semsitter.enabled turns it off.
…uses that frontend The performance validation runners have no SemSitter executable. This build ships the protocol 2 Linux server and turns the frontend on when no path is configured.
…ing PVF Other Linux analyses, including ruling, stay on the default frontend.
a010d0f to
6961f1a
Compare
CI failed: The ruling update job failed because the upstream ruling QA result was cancelled, so it found zero artifacts to download. The analyzer states the cancellation cause is not shown in the log and found no link to this PR's SemSitter frontend changes, so the failure is classed as unrelated to the change.OverviewThe ruling update job failed because the upstream ruling QA result was cancelled, so it found zero artifacts to download. The analyzer states the cancellation cause is not shown in the log and found no link to this PR's SemSitter frontend changes, so the failure is classed as unrelated to the change. FailuresRuling update failed: no ruling artifacts found after upstream ruling QA was cancelled
Summary
Code Review 👍 Approved with suggestions 🟡 Medium risk 3 closed / 4 findingsEnabling SemSitter by default when an executable is available could change parsing and resulting Java analysis findings. Flips the SemSitter feature flag default to on and bundles the Linux SemSitter server for PVF runs, so analyses with a known executable parse with SemSitter. Approved with suggestions: the failure log and Javadoc in 💡 Quality: Failure log and Javadoc still say the default frontend is used📄 java-frontend-semsitter/src/main/java/org/sonar/java/semsitter/SemSitterParserProvider.java:33-35 📄 java-frontend-semsitter/src/main/java/org/sonar/java/semsitter/SemSitterParserProvider.java:45 📄 java-frontend-semsitter/src/main/java/org/sonar/java/semsitter/SemSitterParserProvider.java:89-90 📄 java-frontend-semsitter/src/test/java/org/sonar/java/semsitter/SemSitterParserProviderTest.java:111-116 📄 java-frontend-semsitter/src/test/java/org/sonar/java/semsitter/SemSitterParserProviderTest.java:114-120 📄 java-frontend-semsitter/src/main/java/org/sonar/java/semsitter/SemSitterParserProvider.java:47 📄 java-frontend-semsitter/src/main/java/org/sonar/java/semsitter/SemSitterParserProvider.java:87-89 Now that Make the warning match what actually happens, whatever the default value is✅ 3 closed✅ Bug: Static on-demand import flagged unused when only inherited members used
✅ Bug: Type-import-on-demand counted as used by types from subpackages
✅ Bug: JSymbol equals/hashCode contract violated for id-less symbols
🤖 Prompt for agentsVerification Rules 3/3 met Repos 5 inspected · PRs 2 inspectedFunctional validation No results Rules 3 passed 2 not applicable
Broader impact Repos 5 inspected PRs 2 inspectedCross-repo 5 repositories inspected 0 open impacts
Cross-PR 2 PRs inspected 0 open impacts
Auto-approval Not enabledFor more verification details, comment Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|
/pvf |
|
|
📊 Performance Validation complete |
|
This PR is stale because it has been open 7 days with no activity. If there is no activity in the next 7 days it will be closed automatically |




Stacked on #6555. Do not merge. Throw away after the PVF smoke test.
Summary
The translator that has to be reviewed and merged is #6553. The recorded server answers it replays are #6555.
Test plan
Summary by Gitar
FLAG_DEFAULTto true so SemSitter is used whenever an executable is knownBundledServerto use the Linux SemSitter server when no executable is configuredSemSitterTranslator::translateand reports syntax errors with line and columnrequireFilesSizemaxsize insonar-java-plugin/pom.xmlto 50000000 to fit the bundled serverAnnotationValueImplThis will update automatically on new commits.