rmuir commented on PR #14988:
URL: https://github.com/apache/lucene/pull/14988#issuecomment-3110180033

   There's no better way without adding a ton of complex. I'm happy you found a 
solution that doesn't require `npm install tree-sitter-javadoc`. If you're 
curious, this how that looks: but adding custom injected language makes it too 
hard on developers and also makes things quite a bit slower.
   
   ```yaml
   # sgconfig.yml
   customLanguages:
     javadoc:
       # works cross platform actually, but requires additional `npm install`
       libraryPath: /path/to/javadoc.so
       extensions: [ javadoc ]
       expandoChar: _
   languageInjections:
     - hostLanguage: java
       rule:
         kind: block_comment
         pattern: $CONTENT
         regex: "^/[*][*][^*]"
       injected: javadoc
   
   # now javadoc rules can be written naturally like so:
   # javadoc.yml
   id: no-javadoc-author-tags
   language: javadoc
   rule:
     kind: author_tag
   message: javadoc `@author` tags should not be used
   fix: ""
   severity: error
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to