Bug 57081 - Updating checkstyle to only check for tabs in java, xml, xsd, dtd, htm, html and txt files (not images!)
Summary: Updating checkstyle to only check for tabs in java, xml, xsd, dtd, htm, html ...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2014-10-13 20:29 UTC by Graham Russell
Modified: 2014-10-18 13:50 UTC (History)
1 user (show)



Attachments
Code patch (647 bytes, patch)
2014-10-13 20:29 UTC, Graham Russell
Details | Diff
Update to include more file formats (2.53 KB, patch)
2014-10-14 22:15 UTC, Graham Russell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Russell 2014-10-13 20:29:53 UTC
Created attachment 32104 [details]
Code patch
Comment 1 Philippe Mouawad 2014-10-13 21:03:18 UTC
Date: Mon Oct 13 21:02:22 2014
New Revision: 1631549

URL: http://svn.apache.org/r1631549
Log:
Bug 57081 - Updating checkstyle to only check for tabs in java files (and not images!)
Bugzilla Id: 57081

Modified:
    jmeter/trunk/checkstyle.xml
    jmeter/trunk/xdocs/changes.xml
Comment 2 Sebb 2014-10-14 10:11:07 UTC
Tabs are also deprecated in other text files such as xml, .txt etc.
Comment 3 Graham Russell 2014-10-14 22:15:19 UTC
Created attachment 32112 [details]
Update to include more file formats
Comment 4 Sebb 2014-10-15 21:03:36 UTC
(In reply to Graham from comment #3)
> Created attachment 32112 [details]
> Update to include more file formats

This is better, but the problem with the inclusion method is that new text file types will not be caught. Also there are several text file types that have been omitted (e.g. .properties, .rdf, README)

I think it would be better to exclude binary types.
There are probably fewer of those, and any omissions will be obvious as checkstyle will complain.
Whereas omitted inclusions won't provide any indication.
Comment 5 Graham Russell 2014-10-15 22:46:38 UTC
Unfortunately checkstyle doesn't appear to allow exclusions only inclusions (it might be possible using an external 'suppressions' config file but that seems a little much).

I'd prefer not to have false positives but potentially miss tabs in other obscure text files. Are tabs so evil in these other documents?

On a slightly separate note, do people use this checkstyle config? It does seem to have a lot of things commented out and not be very big, could we perhaps use it more and include more things?

FYI here is a list of all the file extensions JM currently has:
all
bat
bsh
bshrc
cgi
cmd
conf
css
csv
dtd
fb
fdl
gif
htm
html
idx
jar
java
jmx
jpg
jsp
jtl
license
MF
notice
odt
pack
parameters
pdf
png
pom
properties
providers
rdf
readme
sample
set
sh
svg
sxi
sxw
tsv
txt
vsl
xcf
xml
xsd
xsl
Comment 6 Sebb 2014-10-16 00:09:55 UTC
(In reply to Graham Russell from comment #5)
> Unfortunately checkstyle doesn't appear to allow exclusions only inclusions
> (it might be possible using an external 'suppressions' config file but that
> seems a little much).

http://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle-mojo.html#excludes

> I'd prefer not to have false positives but potentially miss tabs in other
> obscure text files. Are tabs so evil in these other documents?

False positives can easily be fixed.

> On a slightly separate note, do people use this checkstyle config? It does
> seem to have a lot of things commented out and not be very big, could we
> perhaps use it more and include more things?

That is a subject for the developer list.
Comment 7 Philippe Mouawad 2014-10-18 12:54:13 UTC
Date: Sat Oct 18 12:53:34 2014
New Revision: 1632783

URL: http://svn.apache.org/r1632783
Log:
Bug 57081 - Updating checkstyle to only check for tabs in java, xml, xsd, xls, dtd, htm, html and txt files (not images!)
Bugzilla Id: 57081

Modified:
    jmeter/trunk/checkstyle.xml
    jmeter/trunk/xdocs/changes.xml
Comment 8 Philippe Mouawad 2014-10-18 13:50:37 UTC
Date: Sat Oct 18 13:49:29 2014
New Revision: 1632791

URL: http://svn.apache.org/r1632791
Log:
Bug 57081 - Updating checkstyle to only check for tabs in java, xml, xsd, xls, dtd, htm, html and txt files (not images!)
Avoid xls
Bugzilla Id: 57081

Modified:
    jmeter/trunk/checkstyle.xml
    jmeter/trunk/xdocs/changes.xml