opengrok
opengrok copied to clipboard
Add support for $ in fortran identifiers and clickable .i include files.
Implementation according to discussion based on vladak https://github.com/oracle/opengrok/issues/4610 I've verified that the include 'file' are clickable. I've signed the oca.
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA). The following contributors of this PR have not signed the OCA:
- PR author: navinp0304
- [email protected] (@navinp0304)
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
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
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
Can you give me more info on this one ?
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
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 https://github.com/oracle/opengrok/blob/f79db409d75bcf91ceab9ed0e9dcbfcde691d838/opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/fortran/FortranXrefTest.java#L39-L44 is the most relevant for this change. It runs the lexer on the https://github.com/oracle/opengrok/blob/master/opengrok-indexer/src/test/resources/analysis/fortran/sample.f file and compares the result with the golden file https://github.com/oracle/opengrok/blob/master/opengrok-indexer/src/test/resources/analysis/fortran/sample_xref.html
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.
@vladak Made the changes suggested by you.
fix the
onNonSymbolMatched()arguments
You mean this https://github.com/oracle/opengrok/pull/4642/commits/84c1728e7fd88ffa5d2df17957c54558257b9c7d ?
fix the
onNonSymbolMatched()argumentsYou mean this 84c1728 ?
yep, something like this (modulo the missing white space around binary operators)
fix the
onNonSymbolMatched()argumentsYou mean this 84c1728 ?
yep, something like this (modulo the missing white space around binary operators) @vladak Do you have any scripts like indent,style oe clang-format and the settings I can use ? Or is it just this ? onNonSymbolMatched(cmatch.substring(cmatch.length()-1,1)
Do you have any scripts like indent,style oe clang-format and the settings I can use ?
The style check is run during Maven build of the project using the maven-checkstyle-plugin (e.g. mvn -DskipTests=true verify), the rules are stored in https://github.com/oracle/opengrok/tree/master/dev/checkstyle
Do you have any scripts like indent,style oe clang-format and the settings I can use ?
The style check is run during Maven build of the project using the
maven-checkstyle-plugin(e.g.mvn -DskipTests=true verify), the rules are stored in https://github.com/oracle/opengrok/tree/master/dev/checkstyle
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 [INFO] --- checkstyle:3.3.1:check (checkstyle) @ opengrok --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ opengrok --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ plugins --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ plugins --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ suggester --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ suggester --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ opengrok-web --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ opengrok-web --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ tools --- [INFO] You have 0 Checkstyle violations. [INFO] --- checkstyle:3.3.1:check (checkstyle) @ tools --- [INFO] You have 0 Checkstyle violations.
The style check is run during Maven build of the project using the
maven-checkstyle-plugin(e.g.mvn -DskipTests=true verify), the rules are stored in https://github.com/oracle/opengrok/tree/master/dev/checkstyleIs 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
Actually, looking at the rules and checkstyle.org documentation I am not sure it can be enforced. Just surround the binary operators with spaces.
Thanks !