jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1
  • MAVEN-159

Avoid clashes between checkstyle and jalopy

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.0-beta-7
  • Fix Version/s: 1.0-beta-10
  • Component/s: None
  • Labels:
    None

Description

Save text below in plugins\maven-checkstyle-plugin-1.1\jalopy-checkstyle.properties.
You can then use it in a project by setting the property
maven.checkstyle.format = jalopy

Some things that jalopy tries to fix - like lines > 80 chars - are still checked because there are some lines jalopy can't split. I've left the header file out of this, but again thats something jalopy
can't always fix.

NB this requires checkstyle 2.4, the 1.1 plugin depends on 2.3.

  1. A Checkstyle setup that ignores anything that jalopy can fix,
  2. for any project that uses both.
  3. The point of this is that you never get errors simply because
  4. of a mismatch in the jalopy and checkstyle setups.
  5. Everything here is in the order it appears in the
  6. checkstyle manual http://checkstyle.sourceforge.net/config.html
  7. to make it easier to find the documentation.
  8. CHECKS FOR JAVADOC COMMENTS
  9. javadoc checks are broken in jalopy, and anyway it
  10. can't write docs for you - so we will use checkstyle.
    checkstyle.javadoc.scope = private
    checkstyle.require.package.html = false
    checkstyle.require.version = false
    checkstyle.allow.no.author = false
  11. dont stop me documenting RuntimeExceptions!
    checkstyle.javadoc.checkUnusedThrows = false
  1. CHECKS FOR NAMING CONVENTIONS
  2. these are the checkstyle defaults
  3. jalopy cannot safely alter names.
    checkstyle.pattern.member = ^[a-z][a-zA-Z0-9]*$
    checkstyle.pattern.publicmember = ^f[A-Z][a-zA-Z0-9]*$
    checkstyle.pattern.const = ^[A-Z]([A-Z0-9_]*[A-Z0-9])?$
    checkstyle.pattern.static = ^[a-z][a-zA-Z0-9]*$
    checkstyle.pattern.parameter = ^[a-z][a-zA-Z0-9]*$
    checkstyle.pattern.package = ^[a-z]+(\.[a-zA-Z_][a-zA-Z_0-9])$
    checkstyle.pattern.type = ^[A-Z][a-zA-Z0-9]*$
    checkstyle.pattern.method = ^[a-z][a-zA-Z0-9]*$
    checkstyle.pattern.localvar = ^[a-z][a-zA-Z0-9]*$
    checkstyle.pattern.localfinalvar = ^[a-z][a-zA-Z0-9]*$
  1. CHECKS FOR HEADERS
  2. leave this to jalopy. This will not always be correct!!
    checkstyle.header.file =
    checkstyle.header.regexp = false
    checkstyle.header.ignoreline =
  1. CHECKS FOR IMPORTS
  2. leave this to jalopy
    checkstyle.ignore.imports = true
  1. CHECKS FOR SIZE VIOLATIONS
  2. still check these because jalopy can't fix every line.
    checkstyle.maxlinelen = 80
    checkstyle.tab.width = 4
    checkstyle.ignore.importlength = false
    checkstyle.ignore.maxlinelen = @version
    checkstyle.maxmethodlen = 150
    checkstyle.maxconstructorlen = 150
    checkstyle.maxfilelen = 2000
    checkstyle.maxparameters = 7
  1. CHECKS FOR WHITESPACE
  2. leave this to jalopy
    checkstyle.allow.tabs = true
    checkstyle.ignore.whitespace = true
  3. this is the variant in the checkstyle manual
    checkstyle.ignore.whitespace.cast = true
  4. and this is what was in maven?
    checkstyle.ignore.cast.whitespace = true
    checkstyle.paren.pad = ignore
    checkstyle.wrap.operator = ignore
  1. CHECKS FOR MODIFIERS
  2. These are semantic checks, so jalopy can't fix them
    checkstyle.ignore.public.in.interface = false
    checkstyle.allow.protected = false
    checkstyle.allow.package = false
  1. CHECKS FOR BRACES
  2. leave this to jalopy
    checkstyle.ignore.braces = true
  3. still check for empty try/catch/finally
    checkstyle.block.try = stmt
    checkstyle.block.catch = text
    checkstyle.block.finally = stmt

checkstyle.lcurly.type = ignore
checkstyle.lcurly.method = ignore
checkstyle.lcurly.other = ignore
checkstyle.rcurly.type = ignore
checkstyle.rcurly.method = ignore
checkstyle.rcurly.other = ignore

  1. MISCELLANEOUS CHECKS
    checkstyle.pattern.todo = TODO:
    checkstyle.ignore.longell = false
    checkstyle.illegal.instantiations =

Issue Links

is depended upon by

Task - A task that needs to be done. MAVEN-401 Release maven-b10

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Ben Walding added a comment - 10/Jun/03 9:37 AM

It's in wiki for the time being. Move to xdoc at some point during a wiki sweep.

http://nagoya.apache.org/wiki/apachewiki.cgi?Maven/JalopyCheckstyleHarmony

Show
Ben Walding added a comment - 10/Jun/03 9:37 AM It's in wiki for the time being. Move to xdoc at some point during a wiki sweep. http://nagoya.apache.org/wiki/apachewiki.cgi?Maven/JalopyCheckstyleHarmony

People

  • Assignee:
    Ben Walding
    Reporter:
    Brian Ewins
Vote (1)
Watch (1)

Dates

  • Created:
    22/Nov/02 10:25 AM
    Updated:
    08/Mar/06 10:46 PM
    Resolved:
    10/Jun/03 9:37 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.