-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for $ in fortran identifiers and clickable .i include files. #4642
Conversation
Implementation according to discussion based on vladak #4610 Signed-off-by: Navin P S <navinp0304@gmail.com>
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
Thank you for signing the OCA. |
@vladak please review this PR |
opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex
Outdated
Show resolved
Hide resolved
...grok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java
Outdated
Show resolved
Hide resolved
There should be a test file that actually uses these newly supported properties. The lexer should be run on the file and compare the xref to golden stored output - see https://github.com/oracle/opengrok/tree/master/opengrok-indexer/src/test/resources/analysis/fortran |
...grok-indexer/src/main/java/org/opengrok/indexer/analysis/fortran/FortranAnalyzerFactory.java
Outdated
Show resolved
Hide resolved
Can you give me more info on this one ? |
The Fortran analysis tests are under https://github.com/oracle/opengrok/tree/master/opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/fortran From there, the opengrok/opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/fortran/FortranXrefTest.java Lines 39 to 44 in f79db40
For this case, I'd recommend creating new Fortran code under https://github.com/oracle/opengrok/tree/master/opengrok-indexer/src/test/resources/analysis/fortran with its expected output and adding a new test (or better parametrize the pre-existing one referenced above). The golden file (expected result) can be obtained e.g. by running the indexer on the sample file or by extracting the data from debugger when stepping through the newly added test case. |
…ortran/FortranAnalyzerFactory.java Co-authored-by: Vladimir Kotal <vlada@kotalovi.cz>
Signed-off-by: Navin P <navinp0304@gmail.com>
@vladak Made the changes suggested by you. |
opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the onNonSymbolMatched()
arguments
Signed-off-by: Navin P <navinp0304@gmail.com>
You mean this 84c1728 ? |
yep, something like this (modulo the missing white space around binary operators) |
|
The style check is run during Maven build of the project using the |
Is it run for lex files ? opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex I see no warnings or errors on that file during mvn -DskipTests=true verify opengrok$ grep -i checkstyle bfile |
Signed-off-by: Navin P <navinp0304@gmail.com>
Actually, looking at the rules and checkstyle.org documentation I am not sure it can be enforced. Just surround the binary operators with spaces. |
opengrok-indexer/src/main/jflex/analysis/fortran/FortranXref.lex
Outdated
Show resolved
Hide resolved
Thanks ! |
Implementation according to discussion based on vladak #4610
I've verified that the include 'file' are clickable.
I've signed the oca.