Skip to content
Commits on Source (5)
#!/usr/bin/env bash
set -e
PREV_RELEASE=$1
RELEASE=$2
echo "PREVIOUS RELEASE version:"$PREV_RELEASE
echo "RELEASE version:"$RELEASE
if [[ -z $RELEASE ]]; then
echo "Problem to calculate release version."
exit 1
fi
if [[ -z $PREV_RELEASE ]]; then
echo "Problem to calculate previous release version."
exit 1
fi
SF_USER=romanivanov
#############################
echo "Please provide password for $SF_USER,checkstyle@shell.sourceforge.net"
echo "exit" | ssh -t $SF_USER,checkstyle@shell.sourceforge.net create
#####
mkdir -p .ci-temp
cd .ci-temp
echo "Clone by ssh only to avoid passwords on push"
git clone git@github.com:checkstyle/checkstyle.github.io.git
sсp -R checkstyle.github.io $SF_USER,checkstyle@shell.sourceforge.net:/home/project-web/checkstyle/
#############################
ssh $SF_USER,checkstyle@shell.sourceforge.net << EOF
echo "Swap html content"
cd /home/project-web/checkstyle
mv htdocs htdocs-$PREV_RELEASE
mv checkstyle.github.io htdocs
ln -s /home/project-web/checkstyle/reports htdocs/reports
echo "restore folder with links to old releases"
mv htdocs-$PREV_RELEASE/version htdocs
echo "Archiving"
tar cfz htdocs-$PREV_RELEASE.tar.gz htdocs-$PREV_RELEASE/
mv htdocs-$PREV_RELEASE.tar.gz htdocs-archive/
rm -rf htdocs-$PREV_RELEASE/
echo "Extracting archive to previous releases documentation"
tar -xzvf htdocs-archive/htdocs-$PREV_RELEASE.tar.gz -C htdocs-version/ \
--exclude="*/apidocs" \
--exclude="*/xref" --exclude="*/xref-test" --exclude="*/cobertura" --exclude="*/dsm" \
--exclude="*/api" --exclude="reports" --exclude="jacoco" --exclude="dtds" \
--exclude="dependency-updates-report.html" --exclude="plugin-updates-report.html" \
--exclude="jdepend-report.html" --exclude="failsafe-report.html" \
--exclude="surefire-report.html" \
--exclude="linkcheck.html" --exclude="findbugs.html" --exclude="taglist.html" \
--exclude="releasenotes_old.html" --exclude="dependencies.html"
echo "Make a link to make it accessible from web"
ln -f -s htdocs-version/htdocs-$PREV_RELEASE htdocs/version/$PREV_RELEASE
EOF
......@@ -7,6 +7,7 @@ my @excludes=qw(
(^|/)images/
^src/it/resources/
^src/test/resources/
^src/site/resources/styleguides/google-java-style-.*
^src/test/resources-noncompilable/
/messages.*_..\.properties$
/releasenotes_old\.xml$
......
......@@ -55,7 +55,7 @@ APRV
areaoftest
arget
argn
Arity
arity
Arquillian
arraycopy
arraylist
......@@ -80,6 +80,7 @@ atlassian
attlist
attr
autoboxing
autocomplete
autocrlf
Autoproxy
Autowire
......@@ -315,8 +316,10 @@ Dexec
dfn
Dfoo
Dforbiddenapis
dghj
Dgpg
Dgui
dhj
Diachenko
dirname
distelli
......@@ -607,6 +610,7 @@ ith
itr
ivanov
ivanovjr
IVersion
iws
Izmailov
jacoco
......@@ -787,7 +791,7 @@ missingdeprecated
missingoverride
missingswitchdefault
missingtag
Mixin
mixin
mkdir
mkordas
MLINKCHECK
......@@ -974,6 +978,7 @@ pgjdbc
Pgpg
pguyot
php
picocli
pid
pitest
pitesttyle
......@@ -1046,6 +1051,7 @@ regexpsingleline
regexpsinglelinejava
relativized
releasenotes
remkop
requirethis
Rethrown
returncount
......@@ -1079,6 +1085,7 @@ Ruslan
rw
sabaka
Sameline
saxonica
sbe
sbt
scache
......@@ -1397,3 +1404,4 @@ yyyy
Yzz
zf
zh
ZSH
......@@ -7,12 +7,13 @@ set -e
spellchecker=.ci/jsoref-spellchecker
whitelist_path=.ci/jsoref-spellchecker/whitelist.words
dict=$spellchecker/english.words
dict=.ci-temp/english.words
word_splitter=$spellchecker/spelling-unknown-word-splitter.pl
run_output=$spellchecker/unknown.words
if [ ! -e $dict ]; then
mkdir -p .ci-temp
echo "Retrieve ./usr/share/dict/linux.words"
words_rpm=$spellchecker/words.rpm
words_rpm=.ci-temp/words.rpm
mirror="https://rpmfind.net"
file_path="/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/w/"
file_name=$(curl -s "${mirror}${file_path}" | grep -o "words-.*.noarch.rpm")
......
......@@ -77,6 +77,17 @@ no-error-apex-core)
rm -rf incubator-apex-core
;;
no-error-equalsverifier)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
checkout_from https://github.com/jqno/equalsverifier.git
cd .ci-temp/equalsverifier
mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../
rm -rf equalsverifier
;;
no-error-hibernate-search)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
......
# Contributing
![](https://raw.githubusercontent.com/checkstyle/resources/master/img/checkstyle-logos/checkstyle-logo-260x99.png)
Please see instructions for contributing here:
http://checkstyle.sourceforge.net/contributing.html
#### [Reporting issues](https://checkstyle.org/report_issue.html)
#### [How to report a bug?](https://checkstyle.org/report_issue.html#How_to_report_a_bug.3F)
#### [Issue Template](https://github.com/checkstyle/checkstyle/blob/master/.github/ISSUE_TEMPLATE.md)
# Reporting issues
Please provide issue report in the format that we request, EACH DETAIL IS A HUGE HELP.
Please read http://checkstyle.sourceforge.net/report_issue.html
Issues that are not following the guidelines,
will be processed as last priority or never or simply closed as invalid.
Please provide issue report in format that we request, EACH DETAIL MAKE A HUGE HELP.
Issues that are not following the guidelines, will be processed with last priority.
# Contributing Guide
Please note that PRs are looked only for approved issues. Follow the PR guide for opening a PR
#### [Pull Request Template](https://github.com/checkstyle/checkstyle/blob/master/.github/PULL_REQUEST_TEMPLATE.md)
Please follow the below links in order to start contributing to the checkstyle project
#### [Beginning Development](http://checkstyle.sourceforge.net/beginning_development.html)
#### [Contribution Guidelines](http://checkstyle.sourceforge.net/contributing.html)
Find the links below to import the checkstyle project to an IDE
#### [Importing checkstyle project to IntelliJ](http://checkstyle.sourceforge.net/idea.html)
#### [Importing checkstyle project to Eclipse](http://checkstyle.sourceforge.net/eclipse.html)
#### [Importing checkstyle project to Netbeans](http://checkstyle.sourceforge.net/netbeans.html)
......@@ -20,4 +20,4 @@ Describe what you expect in detail.
--------------
Still not clear ???
see example - http://checkstyle.sourceforge.net/report_issue.html#How_to_report_a_bug
see example - https://checkstyle.org/report_issue.html#How_to_report_a_bug
......@@ -14,7 +14,7 @@ Rules:
d) MUST be less than or equal to 200 characters
To avoid multiple iterations of fixes and CIs failures, please read
http://checkstyle.sourceforge.net/contributing.html
https://checkstyle.org/contributing.html
ATTENTION: We are not merging Pull Requests that are not passing our CIs,
but we will help to resolve issues.
......
......@@ -28,7 +28,7 @@ or at [Maven repo](http://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle
Each-commit builds of maven artifacts can be found at
[Maven Snapshot repository](https://oss.sonatype.org/content/repositories/snapshots/com/puppycrawl/tools/checkstyle/) .
Documentation is available in HTML format, see http://checkstyle.sourceforge.net/checks.html.
Documentation is available in HTML format, see https://checkstyle.org/checks.html.
Continuous integration and Quality reports
======================
......@@ -36,7 +36,7 @@ Travis (Linux & MacOS build): [![][travis img]][travis]
AppVeyor (Windows build): [![][appveyor img]][appveyor]
[Distelli CI](https://www.distelli.com/checkstyle/builds)
Quality reports: http://checkstyle.sourceforge.net/project-reports.html
Quality reports: https://checkstyle.org/project-reports.html
JavaScript, CSS and Java source file analysis on Codacy: [![][codacy img]][codacy]
......@@ -71,13 +71,13 @@ Licensing
This software is licensed under the terms in the file named "LICENSE" in this
directory.
The software uses the ANTLR package (http://www.antlr.org/). Its license terms
The software uses the ANTLR package (https://www.antlr.org/). Its license terms
are in the file named "RIGHTS.antlr" in this directory.
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
The software uses the Cli, Logging and Beanutils packages from the
The software uses the Logging and Beanutils packages from the
Apache Commons project (http://commons.apache.org/). The license terms
of these packages are in the file named "LICENSE.apache20" in this
directory.
......@@ -87,6 +87,10 @@ The software uses the Google Guava Libraries
these packages are in the file named "LICENSE.apache20" in this
directory.
The software uses the Picocli Library
(https://github.com/remkop/picocli/). Its license terms
are in the file named "LICENSE.apache20" in this directory.
[travis]:https://travis-ci.org/checkstyle/checkstyle/builds
[travis img]:https://travis-ci.org/checkstyle/checkstyle.svg
......
......@@ -3,7 +3,7 @@ SOFTWARE RIGHTS
$Id: RIGHTS.antlr,v 1.1 2001-06-22 13:11:01 oburn Exp $
ANTLR 1989-2000 Developed by jGuru.com (MageLang Institute),
http://www.ANTLR.org and http://www.jGuru.com
https://www.ANTLR.org and http://www.jGuru.com
We reserve no legal rights to the ANTLR--it is fully in the
public domain. An individual or company may do whatever
......
......@@ -68,6 +68,8 @@
<exclude name="src/main/**/*"/>
<exclude name="src/test/java/**/*"/>
<exclude name="src/site/resources/images/**/*"/>
<!-- styleguides are copied/cached from origin place we should not change them -->
<exclude name="src/site/resources/styleguides/**/*"/>
<!-- Eclipse project files -->
<exclude name=".settings/**/*"/>
......@@ -108,6 +110,10 @@
<!-- NonDex files -->
<exclude name=".nondex/**/*" />
<!-- Do not validate possible source code remnants after regression testing -->
<exclude name=".ci-temp/**/*"/>
</fileset>
</path>
<formatter type="plain"/>
......
......@@ -7,7 +7,7 @@
<!--
If you set the basedir property below, then all reported file
names will be relative to the specified directory. See
http://checkstyle.sourceforge.net/config.html#Checker
https://checkstyle.org/config.html#Checker
<property name="basedir" value="${basedir}"/>
-->
......
......@@ -6,9 +6,6 @@
<suppressions>
<!-- Do not validate possible source code remnants after regression testing -->
<suppress checks=".*" files=".ci-temp[\\/]"/>
<!-- Input files for NewlineAtEndOfFileCheckTest, intentional no new line at the end. -->
<suppress checks="NewlineAtEndOfFile"
files="[\\/]test[\\/].*[\\/]InputNewlineAtEndOfFile.*\.java"/>
......
......@@ -29,7 +29,7 @@
<allow class="java.security.NoSuchAlgorithmException" local-only="true"/>
<allow pkg="com.puppycrawl.tools.checkstyle.utils" local-only="true"/>
<allow pkg="com.puppycrawl.tools.checkstyle.grammar" local-only="true"/>
<allow pkg="org.apache.commons.cli" local-only="true"/>
<allow pkg="picocli" local-only="true"/>
<allow pkg="org.antlr.v4.runtime" local-only="true"/>
<allow class="com.puppycrawl.tools.checkstyle.JavadocDetailNodeParser.+"
local-only="true" regex="true"/>
......
......@@ -2,5 +2,5 @@
all excludes should be specified in build configuration -->
<component name="DependencyValidationManager">
<scope name="Checkstyle Inspection Scope"
pattern="!file[checkstyle]:target//*&amp;&amp;!file:src/test/resources*//**&amp;&amp;!file:src/it/resources*//**&amp;&amp;!file:src/site/resources/js/google-analytics.js&amp;&amp;!file:config/intellij-idea-inspections.properties&amp;&amp;!file[checkstyle]:.ci-temp//*&amp;&amp;!file[checkstyle]:bin//*&amp;&amp;!file[checkstyle]:.settings//*&amp;&amp;!file:.classpath&amp;&amp;!file:.project"/>
pattern="!file[checkstyle]:target//*&amp;&amp;!file:src/test/resources*//**&amp;&amp;!file:src/it/resources*//**&amp;&amp;!file:src/site/resources/js/google-analytics.js&amp;&amp;!file:src/site/resources/styleguides*//**&amp;&amp;!file:config/intellij-idea-inspections.properties&amp;&amp;!file[checkstyle]:.ci-temp//*&amp;&amp;!file[checkstyle]:bin//*&amp;&amp;!file[checkstyle]:.settings//*&amp;&amp;!file:.classpath&amp;&amp;!file:.project"/>
</component>
......@@ -19,5 +19,25 @@
//MethodDeclaration[@Name='main']"/>
</properties>
</rule>
<rule ref="category/java/design.xml/ImmutableField">
<properties>
<!-- Fields with these annotations will have their value injected by picocli.
These fields should not be marked final. -->
<property name="ignoredAnnotations"
value="picocli.CommandLine.Option
|picocli.CommandLine.Parameters
|picocli.CommandLine.Spec"/>
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/UnusedPrivateField">
<properties>
<!-- Some fields with picocli annotations will be only used by
the picocli and not by the application.
They may appear unused by static code analysis tools. -->
<property name="ignoredAnnotations"
value="picocli.CommandLine.Option
|picocli.CommandLine.Parameters
|picocli.CommandLine.Spec"/>
</properties>
</rule>
</ruleset>
......@@ -36,7 +36,10 @@
<rule ref="category/java/bestpractices.xml/SystemPrintln">
<properties>
<!-- it is ok to use println in CLI class. -->
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@Image='Main']"/>
<property name="violationSuppressXPath"
value="//ClassOrInterfaceDeclaration
[@Image='Main' or @Image='Main$CliOptions'
or @Image='JavadocPropertiesGenerator']"/>
</properties>
</rule>
......@@ -302,7 +305,7 @@
or @Image='FinalLocalVariableCheck' or @Image='ModifiedControlVariableCheck'
or @Image='ParameterAssignmentCheck' or @Image='UnnecessaryParenthesesCheck'
or @Image='AbstractClassCouplingCheck' or @Image='BooleanExpressionComplexityCheck'
or @Image='ParenPadCheck']//MethodDeclaration[@Name='visitToken']
or @Image='ParenPadCheck' or @Image='IllegalTypeCheck']//MethodDeclaration[@Name='visitToken']
| //ClassOrInterfaceDeclaration[@Image='XdocsJavaDocsTest']
//MethodDeclaration[@Name='testAllCheckSectionJavaDocs']"/>
</properties>
......@@ -310,8 +313,18 @@
<rule ref="category/java/design.xml/TooManyFields">
<properties>
<!-- Unable to split fields out of the class. -->
<!-- Main has an annotated field for each command line option. This is by design. -->
<property name="violationSuppressXPath"
value="//ClassOrInterfaceDeclaration[@Image='Checker']
| //ClassOrInterfaceDeclaration[@Image='Main']"/>
</properties>
</rule>
<rule ref="category/java/design.xml/ImmutableField">
<properties>
<!-- Main has annotated fields whose value is injected by picocli.
These fields should not be marked final. -->
<property name="violationSuppressXPath"
value="//ClassOrInterfaceDeclaration[@Image='Checker']"/>
value="//ClassOrInterfaceDeclaration[@Image='Main']"/>
</properties>
</rule>
<rule ref="category/java/design.xml/TooManyMethods">
......
......@@ -107,6 +107,20 @@
<Method name="loadProperties"/>
<Bug pattern="NP_NULL_PARAM_DEREF"/>
</Match>
<Match>
<!-- won't fix: field values are injected by picocli -->
<Or>
<Class name="com.puppycrawl.tools.checkstyle.Main"/>
<Class name="com.puppycrawl.tools.checkstyle.JavadocPropertiesGenerator"/>
</Or>
<Or>
<Bug pattern="NP_UNWRITTEN_FIELD"/>
<Bug pattern="UWF_UNWRITTEN_FIELD"/>
<Bug pattern="MS_SHOULD_BE_FINAL"/>
<Bug pattern="MS_SHOULD_BE_REFACTORED_TO_BE_FINAL"/>
<Bug pattern="SS_SHOULD_BE_STATIC"/>
</Or>
</Match>
<Match>
<!-- false-positive. See details at https://github.com/checkstyle/checkstyle/pull/5403 -->
<Class name="com.puppycrawl.tools.checkstyle.PackageNamesLoader"/>
......
......@@ -28,12 +28,6 @@
<ignoreVersion type="regex">3.10.0</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="net.sf.saxon" artifactId="Saxon-HE">
<ignoreVersions>
<!-- till https://github.com/checkstyle/checkstyle/issues/6149 -->
<ignoreVersion type="regex">9.9.*</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.apache.maven.plugins" artifactId="maven-release-plugin">
<ignoreVersions>
<!-- we use 2.1 version that is defined at our parent
......
checkstyle (8.15-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Refreshed the patches
- Depend on libpicocli-java instead of libcommons-cli-java
- Fixes the compatibility with saxonhe 9.9.0.2 (Closes: #915335)
-- Emmanuel Bourg <ebourg@apache.org> Tue, 18 Dec 2018 13:50:05 +0100
checkstyle (8.14-1) unstable; urgency=medium
* Team upload.
......