SONARPY-353 Use semantic engine from PyCharm and migrate S4823 (CommandLineArgsCheck) hotspot rule#259
Closed
SONARPY-353 Use semantic engine from PyCharm and migrate S4823 (CommandLineArgsCheck) hotspot rule#259
Conversation
e95c48c to
fd360e6
Compare
d3f3be5 to
d481f0e
Compare
pynicolas
reviewed
Aug 12, 2019
|
|
||
| protected abstract String message(); | ||
|
|
||
| protected boolean isException(PsiElement node) { |
Contributor
There was a problem hiding this comment.
What about having a more useful type for node?
In fact, this method is useless so far since it's never overridden.
| @NotNull | ||
| private static PyFile parseAs(String content, LanguageLevel languageLevel) { | ||
| PsiFile file = psiFileFactory.createFileFromText("test.py", PythonFileType.INSTANCE, normalizeEol(content), System.currentTimeMillis(), false, false); | ||
| PsiFile file = psiFileFactory.createFileFromText("test.py", PythonFileType.INSTANCE, normalizeEol(content), System.currentTimeMillis(), true, false); |
| PsiBuilderFactoryImpl psiBuilderFactory = new PsiBuilderFactoryImpl(); | ||
| application.registerService(PsiBuilderFactory.class, psiBuilderFactory); | ||
| application.registerService(ProgressManager.class, ProgressManagerImpl.class); | ||
| application.registerService(PropertiesComponent.class, PropertiesComponentImpl.class); |
Contributor
There was a problem hiding this comment.
All unit tests are green if I remove this line.
| registerExtension(PythonDialectsTokenSetContributor.EP_NAME, new PythonTokenSetContributor()); | ||
|
|
||
| registerExtensionPoint(ConfigurationType.CONFIGURATION_TYPE_EP, ConfigurationType.class); | ||
| registerExtension(ConfigurationType.CONFIGURATION_TYPE_EP, new PythonTestConfigurationType()); |
Contributor
There was a problem hiding this comment.
All unit tests are green if I remove the 2 lines above.
| registerFileTypeFactory(); | ||
|
|
||
| registerExtensionPoint(PyReferenceCustomTargetChecker.Companion.getEP_NAME(), PyReferenceCustomTargetChecker.class); | ||
| registerExtension(PyReferenceCustomTargetChecker.Companion.getEP_NAME(), new PyTestFixtureTargetChecker()); |
Contributor
There was a problem hiding this comment.
All unit tests are green if I remove the 2 lines above.
|
|
||
| ExtensionPointName<QueryExecutor> superMethodSearch = ExtensionPointName.create("Pythonid.pySuperMethodsSearch"); | ||
| registerExtensionPoint(superMethodSearch, QueryExecutor.class); | ||
| registerExtension(superMethodSearch, new PySuperMethodsSearchExecutor()); |
Contributor
There was a problem hiding this comment.
All unit tests are green if I remove the 3 lines above.
| return sdkDir; | ||
| } | ||
|
|
||
| private static void copyResource(String res, String dest) { |
Contributor
There was a problem hiding this comment.
Having dest as a java.io.File would be clearer to me.
| </includes> | ||
| </filter> | ||
| <filter> | ||
| <artifact>com.jetbrains.pycharm:jps-model</artifact> |
Contributor
There was a problem hiding this comment.
Update whitelist on jps model
hashicorp-vault-sonar-prod Bot
pushed a commit
that referenced
this pull request
May 22, 2025
…259) GitOrigin-RevId: 745efcfcfbe6cc9c83275302d7a97b1633b81293
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.