-
Notifications
You must be signed in to change notification settings - Fork 748
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
Addition of ClojureAnalyzerFactoryTest #1112
Conversation
Errors were noted from ctags when trying to analyze clojure files `repetition-operator operand invalid` Changed the regex matching for the clojure files to remove such errors and added a unit test for ClojureAnalyzer
https://github.com/takari/maven-wrapper This will help standardize the version of maven that is necessary to build the project.
Added a test and checked that the Definitions are properly resolving to the correct tag type and line number.
Looks ok but Also the sample clj file - it is under cpl license, I need to figure out if it can be merged with cddl. Also ideally get the oca to Oracle inboxes, I will ping the oca owner for opengrok to handle your signature quickly. Ttyl |
Also the regexp needs to be posix compliant so ctags on Solaris or other posix system will do correct things |
And travis fails - https://travis-ci.org/OpenGrok/OpenGrok fwiw I use universal ctags - https://github.com/universal-ctags/ctags |
and I just recieved your OCA, thank you for that! :) |
fwiw - the skipped tests are nicely reported in jenkins test UI :) |
@@ -67,6 +67,7 @@ | |||
= Pattern.compile("([\\.\\d]+)\\W+\\((\\w+)"); | |||
|
|||
public CVSRepository() { | |||
working = Boolean.FALSE; |
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.
this should not default to true (which RCS from it inherits does)
@tarzanek thanks for looking at it. Not sure why I didn't see the travis build earlier.
Is the jenkins build private ? Travis doesn't show a test JUnit breakdown from the reports. |
@fzakaria sorry for travis, my fault, github introduced new permissions and I forgot to give part of them to travis, now travis should be seen again in pull reqs. |
command.add("--regex-clojure=/\\([[:space:]]*defstruct[[:space:]]+([-[[:alnum:]]*+!_:\\/.?]+)/\\1/s,struct/"); | ||
command.add("--regex-clojure=/\\([[:space:]]*intern[[:space:]]+([-[[:alnum:]]*+!_:\\/.?]+)/\\1/v,intern/"); | ||
command.add("--regex-clojure=/\\([[:space:]]*ns[[:space:]]+([-[[:alnum:]]*+!_:\\/.?]+)/\\1/n,namespace/"); | ||
command.add("--regex-clojure=/\\([ \\t]*create-ns[ \\t]+([-[:alnum:]*+!_:\\/.?]+)/\\1/n,namespace/"); |
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.
please use :space: and :alnum: as defined in posix for regexps, don't use " \t"
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.
fwiw - all looks fine, I just don't like that you switch char classes to just few chars, that said clojure might be using the other whitespace so I might be wrong, but still, if possible please make sure the regexps are posix compliant, otherwise your code/ctag def will fail terribly on posix systems such as Solaris (ctags consume posix regexp library there, so they behave slightly different than on linux where they use the gnu version of regexp library) |
@tarzanek updated the ctags regex to be POSIX compliant. |
thank you, merging, will recheck the tests on the private jenkins (which runs on solaris 12) |
fwiw - some change is still needed, since tests fail for me on Solaris, so I will just go ahead and commit the necessary posix changes |
ok, reason is actually that universal ctags has clojure parser which isn't as good as the gist we use |
awesome. |
I noticed that when I was running the tests, it did not look like it was analyzing the Clojure code correctly.
I was seeing plenty of errors of the type
repetition-operator operand invalid
wth the ctags regex provided.Grokking around, I found similar ctag regex that didn't result in the error and I wrote a test to verify that the definitions are correctly resolving.
I also added Maven Wrapper because I think it is good practice for any project that uses Maven.
FWIW here is my version of ctags: