You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2021/03/23 00:16:48 UTC

[lucene] branch jira/LUCENE-9856-static-analysis updated (3bbfdcd -> 4f5f471)

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a change to branch jira/LUCENE-9856-static-analysis
in repository https://gitbox.apache.org/repos/asf/lucene.git.


    from 3bbfdcd  Merge branch 'main' into jira/LUCENE-9856-static-analysis
     new 24ee3e1  Revert "LUCENE-9856: add module-specific overrides"
     new 4f5f471  LUCENE-9856: allow SuppressWarnings("unused") to disable unusedLocal check via secret ecj option!

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gradle/validation/ecj-lint.gradle             | 22 +---------------------
 gradle/validation/ecj-lint/ecj.javadocs.prefs |  2 +-
 2 files changed, 2 insertions(+), 22 deletions(-)

[lucene] 02/02: LUCENE-9856: allow SuppressWarnings("unused") to disable unusedLocal check via secret ecj option!

Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch jira/LUCENE-9856-static-analysis
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 4f5f47152553d53c626be48f186efb446b704838
Author: Robert Muir <rm...@apache.org>
AuthorDate: Mon Mar 22 20:16:02 2021 -0400

    LUCENE-9856: allow SuppressWarnings("unused") to disable unusedLocal check via secret ecj option!
    
    Still need to fix queryparser, but this fixes expressions
---
 gradle/validation/ecj-lint/ecj.javadocs.prefs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gradle/validation/ecj-lint/ecj.javadocs.prefs b/gradle/validation/ecj-lint/ecj.javadocs.prefs
index 70d8683..c840b1b 100644
--- a/gradle/validation/ecj-lint/ecj.javadocs.prefs
+++ b/gradle/validation/ecj-lint/ecj.javadocs.prefs
@@ -67,7 +67,7 @@ org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
 org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore

[lucene] 01/02: Revert "LUCENE-9856: add module-specific overrides"

Posted by rm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch jira/LUCENE-9856-static-analysis
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 24ee3e1d97276698df73b9bbde9be78fab70f905
Author: Robert Muir <rm...@apache.org>
AuthorDate: Mon Mar 22 20:14:57 2021 -0400

    Revert "LUCENE-9856: add module-specific overrides"
    
    This reverts commit 66afbd682492e5209047dbe37afb138d9dadd479.
---
 gradle/validation/ecj-lint.gradle | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/gradle/validation/ecj-lint.gradle b/gradle/validation/ecj-lint.gradle
index 7ed9b7c..09c4ebe 100644
--- a/gradle/validation/ecj-lint.gradle
+++ b/gradle/validation/ecj-lint.gradle
@@ -47,22 +47,6 @@ allprojects {
         // The inputs are all source files from the sourceSet.
         inputs.files sourceSet.allSource.asFileTree
 
-        // ECJ preferences
-        Properties properties = new Properties()
-        properties.load(file("${resources}/ecj.javadocs.prefs").newDataInputStream())
-        inputs.properties(properties);
-
-        // module-specific overrides
-        // sorry Dawid :)
-        switch(project.name) {
-          case "queryparser":
-            // TODO: fix/exclude generated code?
-            properties.put("org.eclipse.jdt.core.compiler.problem.unusedLocal", "ignore");
-          case "expressions":
-            // TODO: fix/exclude generated code?
-            properties.put("org.eclipse.jdt.core.compiler.problem.unusedLocal", "ignore");
-        }
-
         // This task has no proper outputs.
         setupDummyOutputs(task)
 
@@ -81,10 +65,6 @@ allprojects {
 
         args += [ "-d", "none" ]
 
-        // write final ECJ properties file
-        def prefsFile = project.file("${getTemporaryDir()}/ecj.prefs")
-        properties.store(prefsFile.newDataOutputStream(), "ecj prefs")
-
         // Compilation environment.
         args += [ "-source", project.java.sourceCompatibility ]
         args += [ "-target", project.java.targetCompatibility ]
@@ -92,7 +72,7 @@ allprojects {
         args += [ "-proc:none" ]
         args += [ "-nowarn" ]
         args += [ "-enableJavadoc" ]
-        args += [ "-properties", prefsFile.absolutePath ]
+        args += [ "-properties", file("${resources}/ecj.javadocs.prefs").absolutePath ]
 
         // disable for now because individual file excludes cannot be applied to ecj.
         // enabled = false