Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] Re: What should Eclipse compiler default settings be ?

Changing the compiler defaults to report more warnings that it did
previously may have unfortunate consequences. People will think that the
compiler has changed for 2.1 and that their code is now broken. I also
think it would be a bad idea if the default option settings would cause the
Eclipse compiler to report warnings that would surprise a javac user, since
these also make the Eclipse compiler look bad. It is better to allow the
user to turn these extra checks on if they really want them.



                                                                                                                                        
                      "Philippe Mulet"                                                                                                  
                      <Philippe_Mulet@oti         To:      jdt-core-dev@xxxxxxxxxxx                                                     
                      .com>                       cc:                                                                                   
                      Sent by:                    Subject: [jdt-core-dev] Re: What should Eclipse compiler default settings be ?        
                      jdt-core-dev-admin@                                                                                               
                      eclipse.org                                                                                                       
                                                                                                                                        
                                                                                                                                        
                      10/16/2002 07:02 AM                                                                                               
                      Please respond to                                                                                                 
                      jdt-core-dev                                                                                                      
                                                                                                                                        
                                                                                                                                        




I forgot to say that we would like to change these default settings since
it appears to be a common scenario for Eclipse developpers (unused imports
easily occur when using codeassist with import insertions).




                      Philippe Mulet

                                               To:
jdt-core-dev@xxxxxxxxxxx

                      10/16/2002 01:00         cc:

                      PM                       Subject:  What should
Eclipse compiler default settings be ?





Currently, the Eclipse compiler settings default to the following values
(see at bottom).
We are tempted to consider changing 2 default settings:

       *    COMPILER / Reporting Unused Import
       *          When enabled, the compiler will issue an error or a
warning for unused import
       *          reference
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.unusedImport"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "warning"
<<<<<<<<<<<<<<<<<<< was "ignore"
       *
       *    COMPILER / Reporting Synthetic Access Emulation
       *          When enabled, the compiler will issue an error or a
warning whenever it emulates
       *          access to a non-accessible member of an enclosing type.
Such access can have
       *          performance implications.
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "warning"
<<<<<<<<<<<<<<<<<<< was "ignore"


If you have an opinion, please react asap so we can agree. The rational is
that most people never change the default settings, and thus we have to
find a good compromise in between useful information and overhelming one
(also we cannot downgrade or raise errors which are spec'ed by the JLS - by
default, e.g. unreachable code diagnosis must be an error by default, even
if our compiler can eliminate the corresponding bytecodes silently).

Current settings:

       *    COMPILER / Generating Local Variable Debug Attribute
       *          When generated, this attribute will enable local variable
names
       *          to be displayed in debugger, only in place where
variables are
       *          definitely assigned (.class file is then bigger)
       *                - option id:
"org.eclipse.jdt.core.compiler.debug.localVariable"
       *                - possible values:      { "generate", "do not
generate" }
       *                - default:              "generate"
       *
       *    COMPILER / Generating Line Number Debug Attribute
       *          When generated, this attribute will enable source code
highlighting in debugger
       *          (.class file is then bigger).
       *                - option id:
"org.eclipse.jdt.core.compiler.debug.lineNumber"
       *                - possible values:      { "generate", "do not
generate" }
       *                - default:              "generate"
       *
       *    COMPILER / Generating Source Debug Attribute
       *          When generated, this attribute will enable the debugger
to present the
       *          corresponding source code.
       *                - option id:
"org.eclipse.jdt.core.compiler.debug.sourceFile"
       *                - possible values:      { "generate", "do not
generate" }
       *                - default:              "generate"
       *
       *    COMPILER / Preserving Unused Local Variables
       *          Unless requested to preserve unused local variables (i.e.
never read), the
       *          compiler will optimize them out, potentially altering
debugging
       *                - option id:
"org.eclipse.jdt.core.compiler.codegen.unusedLocal"
       *                - possible values:      { "preserve", "optimize
out" }
       *                - default:              "preserve"
       *
       *    COMPILER / Defining Target Java Platform
       *          For binary compatibility reason, .class files can be
tagged to with certain VM versions and later.
       *          Note that "1.4" target require to toggle compliance mode
to "1.4" too.
       *                - option id:
"org.eclipse.jdt.core.compiler.codegen.targetPlatform"
       *                - possible values:      { "1.1", "1.2", "1.3",
"1.4" }
       *                - default:              "1.1"
       *
       *    COMPILER / Reporting Unreachable Code
       *          Unreachable code can optionally be reported as an error,
warning or simply
       *          ignored. The bytecode generation will always optimized it
out.
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.unreachableCode"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "error"
       *
       *    COMPILER / Reporting Invalid Import
       *          An import statement that cannot be resolved might
optionally be reported
       *          as an error, as a warning or ignored.
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.invalidImport"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "error"
       *
       *    COMPILER / Reporting Attempt to Override Package-Default Method
       *          A package default method is not visible in a different
package, and thus
       *          cannot be overridden. When enabling this option, the
compiler will signal
       *          such scenarii either as an error or a warning.
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "warning"
       *
       *    COMPILER / Reporting Method With Constructor Name
       *          Naming a method with a constructor name is generally
considered poor
       *          style programming. When enabling this option, the
compiler will signal such
       *          scenarii either as an error or a warning.
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.methodWithConstructorName"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "warning"
       *
       *    COMPILER / Reporting Deprecation
       *          When enabled, the compiler will signal use of deprecated
API either as an
       *          error or a warning.
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.deprecation"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "warning"
       *
       *    COMPILER / Reporting Deprecation Inside Deprecated Code
       *          When enabled, the compiler will signal use of deprecated
API inside deprecated code.
       *     The severity of the problem is controlled with option
"org.eclipse.jdt.core.compiler.problem.deprecation".
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode"
       *                - possible values:      { "enabled", "disabled" }
       *                - default:              "disabled"
       *
       *    COMPILER / Reporting Hidden Catch Block
       *          Locally to a try statement, some catch blocks may hide
others , e.g.
       *                try { throw new java.io.CharConversionException();
       *                } catch (java.io.CharConversionException e) {
       *        } catch (java.io.IOException e) {}.
       *          When enabling this option, the compiler will issue an
error or a warning for hidden
       *          catch blocks corresponding to checked exceptions
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "warning"
       *
       *    COMPILER / Reporting Unused Local
       *          When enabled, the compiler will issue an error or a
warning for unused local
       *          variables (i.e. variables never read from)
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.unusedLocal"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "ignore"
       *
       *    COMPILER / Reporting Unused Parameter
       *          When enabled, the compiler will issue an error or a
warning for unused method
       *          parameters (i.e. parameters never read from)
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.unusedParameter"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "ignore"
       *
       *    COMPILER / Reporting Unused Import
       *          When enabled, the compiler will issue an error or a
warning for unused import
       *          reference
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.unusedImport"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "ignore"
       *
       *    COMPILER / Reporting Synthetic Access Emulation
       *          When enabled, the compiler will issue an error or a
warning whenever it emulates
       *          access to a non-accessible member of an enclosing type.
Such access can have
       *          performance implications.
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "ignore"
       *
       *    COMPILER / Reporting Non-Externalized String Literal
       *          When enabled, the compiler will issue an error or a
warning for non externalized
       *          String literal (i.e. non tagged with //$NON-NLS-<n>$).
       *                - option id:
"org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral"
       *                - possible values:      { "error", "warning",
"ignore" }
       *                - default:              "ignore"
       *
       * COMPILER / Reporting Usage of 'assert' Identifier
       *    When enabled, the compiler will issue an error or a warning
whenever 'assert' is
       *    used as an identifier (reserved keyword in 1.4)
       *     - option id:
"org.eclipse.jdt.core.compiler.problem.assertIdentifier"
       *     - possible values:     { "error", "warning", "ignore" }
       *     - default:             "ignore"
       *
       * COMPILER / Reporting Usage of expression receiver on static
invocation/field access
       *    When enabled, the compiler will issue an error or a warning
whenever a static field
       *    or method is accessed with an expression receiver.
       *     - option id:
"org.eclipse.jdt.core.compiler.problem.staticAccessReceiver"
       *     - possible values:     { "error", "warning", "ignore" }
       *     - default:             "warning"
       *
       * COMPILER / Setting Source Compatibility Mode
       *    Specify whether source is 1.3 or 1.4 compatible. From 1.4 on,
'assert' is a keyword
       *    reserved for assertion support. Also note, than when toggling
to 1.4 mode, the target VM
       *   level should be set to "1.4" and the compliance mode should be
"1.4".
       *     - option id:
"org.eclipse.jdt.core.compiler.source"
       *     - possible values:     { "1.3", "1.4" }
       *     - default:             "1.3"
       *
       * COMPILER / Setting Compliance Level
       *    Select the compliance level for the compiler. In "1.3" mode,
source and target settings
       *    should not go beyond "1.3" level.
       *     - option id:
"org.eclipse.jdt.core.compiler.compliance"
       *     - possible values:     { "1.3", "1.4" }
       *     - default:             "1.3"
       *
       * COMPILER / Maximum number of problems reported per compilation
unit
       *    Specify the maximum number of problems reported on each
compilation unit.
       *     - option id:
"org.eclipse.jdt.core.compiler.maxProblemPerUnit"
       *     - possible values:     "<n>" where <n> is zero or a positive
integer (if zero then all problems are reported).
       *     - default:             "100"
       *
       * COMPILER / Define the Automatic Task Tags
       *    When the tag is non empty, the compiler will issue a task
marker whenever it encounters
       *    one of the corresponding tag inside any comment in Java source
code.
       *    Generated task messages will include the tag, and range until
the next line separator or comment ending, and will be trimmed.
       *     - option id:
"org.eclipse.jdt.core.compiler.taskTags"
       *     - possible values:     { "<tag>[,<tag>]*" } where <tag> is a
String without any wild-card
       *     - default:             ""
       *
       * COMPILER / Define the Automatic Task Priorities
       *    In parallel with the Automatic Task Tags, this list defines the
priorities (high, normal or low)
       *    of the task markers issued by the compiler.
       *    If the default is specified, the priority of each task marker
is "NORMAL".
       *     - option id:
"org.eclipse.jdt.core.compiler.taskPriorities"
       *     - possible values:     { "<priority>[,<priority>]*" } where
<priority> is one of "HIGH", "NORMAL" or "LOW"
       *     - default:             ""



_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev






Back to the top