[GitHub] [lucene-solr] mocobeta commented on issue #1242: LUCENE-9201: Port documentation-lint task to Gradle build
mocobeta commented on issue #1242: LUCENE-9201: Port documentation-lint task to Gradle build URL: https://github.com/apache/lucene-solr/pull/1242#issuecomment-585101615 @dweiss thank you for your comments and the patch in Jira. Let me close this PR for now and open another ones (in a week or so), to narrow down the scopes. - source code linting by ECJ (unused imports check) - documentation linting by the python checkers: this may be further split into - "missing javadoc check" (defined at each sub-project) and - "broken links check" (defined at the root project to check inter-project links) 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[GitHub] [lucene-solr] mocobeta commented on issue #1242: LUCENE-9201: Port documentation-lint task to Gradle build
mocobeta commented on issue #1242: LUCENE-9201: Port documentation-lint task to Gradle build URL: https://github.com/apache/lucene-solr/pull/1242#issuecomment-584671311 > I'd rewrite the whole thing - should I work on it? (I don't have much time, but spending too much time here in explaining what to do costs more time). IMHO, the current setup is very gradle-unlike. You'd never do it like that, feels like Ant. :-) > ECJ only task: new name sourceLint, defined for each sourceSet separately; check task depends on it. OK, should I close this PR and create another ones. It may takes time to make good ones for me, so the work would be suitable for someone who is familiar with gradle than me. > Creating the all-in-one documentation folder in lucene and solr root projects (including the index.html listing all projects). Just for your information, this is also discussed in JIRA: https://issues.apache.org/jira/browse/LUCENE-9201 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[GitHub] [lucene-solr] mocobeta commented on issue #1242: LUCENE-9201: Port documentation-lint task to Gradle build
mocobeta commented on issue #1242: LUCENE-9201: Port documentation-lint task to Gradle build URL: https://github.com/apache/lucene-solr/pull/1242#issuecomment-584574521 Thanks @uschindler for your comments. I rewrote the task to use sourceSets instead of relying the assumption the target projects (for linting) have "src/java". However there is another problem, the Java source directory isn't available from SourceSet as far as I know. Actual source directory path is required when executing the ECJ. ```groovy // excerpt from the custom ECJ lint task project.plugins.withId('java', { project.sourceSets.each { sourceSet -> project.javaexec { classpath { project.rootProject.configurations.ecj.asPath } main = "org.eclipse.jdt.internal.compiler.batch.Main" args += [ // Unfortunately, 'testCompileClasspath' is not available from sourceSet, so without the second term test classes cannot be compiled. "-classpath", sourceSet.compileClasspath.toList().join(':') + project.configurations.testCompileClasspath.findAll().join(":"), "-d", dstDir, "-encoding", "UTF-8", "-source", "11", // How this can be obtained from sourceSet or project? "-target", "11", "-nowarn", "-enableJavadoc", "-properties", "${project.rootProject.rootDir}/lucene/tools/javadoc/ecj.javadocs.prefs", "src/java" // ... or "src/test". How this can be obtained from sourceSet or project? ] } } }) ``` SourceSet has a property `allJava` that contains all Java source file, this is no help here. https://docs.gradle.org/current/dsl/org.gradle.api.tasks.SourceSet.html#org.gradle.api.tasks.SourceSet I might misses something, or another hack is required to identify the actual source directory path? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org