From 7344a99c8844d5be792a68675a2844bcf0fdaa66 Mon Sep 17 00:00:00 2001 From: Oliver Burn Date: Sat, 23 Oct 2004 12:48:59 +0000 Subject: [PATCH] Migrated more documentation. --- docs/config_duplicates.html | 164 ------------------------------------ 1 file changed, 164 deletions(-) delete mode 100644 docs/config_duplicates.html diff --git a/docs/config_duplicates.html b/docs/config_duplicates.html deleted file mode 100644 index b73ba0012..000000000 --- a/docs/config_duplicates.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - Duplicate Code Checks - - - - - - - - - - -

Duplicate Code Checks

Checkstyle Logo
- - - - - - - - -
- -There are many trade-offs when writing a duplicate code detection tool. -Some of the conflicting goals are: -
    -
  • Fast
  • -
  • Low memory usage
  • -
  • Avoid false alarms
  • -
  • Support multiple/arbitrary languages
  • -
  • Support Fuzzy matches (comments, whitespace, linebreaks, variable renaming, etc.)
  • -
-

- -

-Note that there are brilliant commercial implementations of duplicate code -detection tools. One that is particularly noteworthy is -Simian -from RedHill Consulting, Inc. -

-

-Simian is reasonably priced (free for noncommercial projects) -and includes a Checkstyle plugin. -We encourage all users of Checkstyle to evaluate Simian as an -alternative to the Checks we offer in our distribution. -

- -

-The following table summarizes the characteristics of the available -Checkstyle plugins for duplicate code detection: - - - - - - - - - - - - - - - - - - - - - - - - - -
NameSpeedMemory UsageFalse AlarmsSupported languagesFuzzy matches
StrictDuplicateCodeMediumVery LowPossible but very unlikelyany languageNo
SimianVery highLowPossible but very unlikelymany languages, including Java and C/C++/C#Limited support
- -

- - -

StrictDuplicateCode

-

- Performs a line-by-line comparison of all code lines and reports - duplicate code, i.e. a sequence of lines that differ only in indentation. - All import statements in Java code are ignored, any other line - - including javadoc, whitespace lines between methods, etc. - is considered - (which is why the check is called strict). -

- -

Properties

- - - - - - - - - - - - - - - - - - - -
namedescriptiontypedefault value
minhow many lines must be equal to be considered a duplicateint12
charsetname of the file charsetStringSystem property "file.encoding"
-

Examples

-

- To configure the check: -

-
-<module name="StrictDuplicateCode"/>
-      
-

- To configure the check so that it allows larger equivalent blocks: -

-
-<module name="StrictDuplicateCode">
-    <property name="min" value="15"/>
-</module>
-      
-

- To configure the check so that it handles files with the UTF-8 - charset: -

-
-<module name="StrictDuplicateCode">
-    <property name="charset" value="UTF-8"/>
-</module>
-      
- -

Package

-

- com.puppycrawl.tools.checkstyle.checks.duplicates -

-

Parent Module

-

- Checker -

- -
-
-
Back to the Checkstyle Home Page
- - - - \ No newline at end of file