Changeset 18974 in josm


Ignore:
Timestamp:
2024-02-12T23:00:59+01:00 (3 months ago)
Author:
taylor.smock
Message:

Fix #23465: Remove custom checkstyle plugin

TopLevelJavadocCheck.java is duplicating functionality from MissingJavadocType.
Our custom class is from #14794 (closed 2017-10-16). The check that makes it
redundant was added in checkstyle 8.20 (released 2019-04-28).

This adds the missing javadocs for the more comprehensive checkstyle version.

Location:
trunk
Files:
4 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r18871 r18974  
    7272        <property name="proj-build.dir" location="${base.dir}/build2"/>
    7373        <property name="script-build.dir" location="${base.dir}/build2"/>
    74         <property name="checkstyle-build.dir" location="${base.dir}/build2"/>
    7574        <property name="epsg.output" location="${resources.dir}/data/projection/custom-epsg"/>
    7675        <property name="commons-lang3.jar" location="${tools.dir}/commons-lang3.jar"/>
     
    363362        <delete dir="${proj-build.dir}"/>
    364363        <delete dir="${script-build.dir}"/>
    365         <delete dir="${checkstyle-build.dir}"/>
    366364        <delete dir="${dist.dir}"/>
    367365        <delete dir="${mapcss.dir}/parsergen"/>
     
    883881    </target>
    884882
    885     <target name="checkstyle-compile" depends="init" description="Compile Checkstyle rules">
     883    <target name="checkstyle-changed" depends="init" description="Run Checkstyle on SVN/Git-changed source files">
    886884        <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="checkstyle.classpath" conf="checkstyle"/>
    887         <mkdir dir="${checkstyle-build.dir}"/>
    888         <javac sourcepath="" srcdir="${checkstyle.dir}/src" failonerror="true"
    889             destdir="${checkstyle-build.dir}" release="${java.lang.version}" debug="on"
    890             includeantruntime="false"
    891             encoding="UTF-8" classpathref="checkstyle.classpath">
    892         </javac>
    893     </target>
    894     <target name="checkstyle-changed" depends="checkstyle-compile" description="Run Checkstyle on SVN/Git-changed source files">
    895885        <exec append="false" osfamily="unix" executable="bash" failifexecutionfails="true">
    896886            <arg value="-c"/>
    897             <arg value="(git ls-files src test --modified 2>/dev/null || svn status -q --ignore-externals src test) | grep -o '\(src\|test\)/.*' | xargs java -cp '${toString:checkstyle.classpath}:${checkstyle-build.dir}' com.puppycrawl.tools.checkstyle.Main -c ${checkstyle.dir}/josm_checks.xml | sed -e 's:\([^ ]*\) [^:]*/\([^:/]*.java\:[^:]*\):(\2)\1:'"/>
     887            <arg value="(git ls-files src test --modified 2>/dev/null || svn status -q --ignore-externals src test) | grep -o '\(src\|test\)/.*' | xargs java -cp '${toString:checkstyle.classpath}' com.puppycrawl.tools.checkstyle.Main -c ${checkstyle.dir}/josm_checks.xml | sed -e 's:\([^ ]*\) [^:]*/\([^:/]*.java\:[^:]*\):(\2)\1:'"/>
    898888        </exec>
    899889        <exec append="false" osfamily="windows" executable="powershell" failifexecutionfails="true">
    900890            <arg value="/c"/>
    901             <arg value="svn status -q --ignore-externals src test | ForEach-Object {java -cp '${toString:checkstyle.classpath};${checkstyle-build.dir}' com.puppycrawl.tools.checkstyle.Main -c ${checkstyle.dir}/josm_checks.xml $_.split(' ')[7]}"/>
    902         </exec>
    903     </target>
    904     <target name="checkstyle" depends="checkstyle-compile" description="Run Checkstyle on the source files">
     891            <arg value="svn status -q --ignore-externals src test | ForEach-Object {java -cp '${toString:checkstyle.classpath}' com.puppycrawl.tools.checkstyle.Main -c ${checkstyle.dir}/josm_checks.xml $_.split(' ')[7]}"/>
     892        </exec>
     893    </target>
     894    <target name="checkstyle" depends="init" description="Run Checkstyle on the source files">
     895        <ivy:cachepath log="download-only" file="${tools.ivy}" pathid="checkstyle.classpath" conf="checkstyle"/>
    905896        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties">
    906897            <classpath refid="checkstyle.classpath"/>
    907             <classpath path="${checkstyle-build.dir}"/>
    908898        </taskdef>
    909899        <checkstyle config="${checkstyle.dir}/josm_checks.xml">
  • trunk/test/unit/org/openstreetmap/josm/testutils/PluginServer.java

    r18694 r18974  
    2525import org.openstreetmap.josm.tools.Logging;
    2626
     27/**
     28 * Serve "remote" test plugins for tests
     29 */
    2730public class PluginServer {
     31    /**
     32     * A holder class for a "remote" plugin for tests
     33     */
    2834    public static class RemotePlugin {
    2935        private final File srcJar;
     
    226232    }
    227233
     234    /**
     235     * A wiremock server rule for serving plugins
     236     */
    228237    public class PluginServerRule extends WireMockExtension {
    229238        public PluginServerRule(Options ruleOptions, boolean failOnUnmatchedRequests) {
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/ResetUniquePrimitiveIdCounters.java

    r18870 r18974  
    3737@ExtendWith(ResetUniquePrimitiveIdCounters.Reset.class)
    3838public @interface ResetUniquePrimitiveIdCounters {
     39    /**
     40     * Reset the id counters for {@link Node}, {@link Way}, and {@link Relation}
     41     * {@link org.openstreetmap.josm.data.osm.AbstractPrimitive#getIdGenerator} calls.
     42     */
    3943    class Reset implements BeforeEachCallback {
    4044        private static AtomicLong[] ID_COUNTERS;
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/TaggingPresets.java

    r18958 r18974  
    3232public @interface TaggingPresets {
    3333
     34    /**
     35     * Reset the tagging presets between each test -- presets will be reset if they are changed.
     36     */
    3437    class TaggingPresetsExtension implements BeforeEachCallback, BeforeAllCallback {
    3538        private static int expectedHashcode = 0;
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/TestUser.java

    r18821 r18974  
    3333@Target({ElementType.TYPE, ElementType.METHOD})
    3434public @interface TestUser {
     35    /**
     36     * Initialize a user for tests
     37     */
    3538    class TestUserExtension implements BeforeAllCallback, BeforeEachCallback, AfterEachCallback {
    3639        @Override
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/Timezone.java

    r18694 r18974  
    2121@ExtendWith(Timezone.TimezoneExtension.class)
    2222public @interface Timezone {
     23    /**
     24     * Set the default timezone for tests (UTC)
     25     */
    2326    class TimezoneExtension implements BeforeEachCallback {
    2427        @Override
  • trunk/tools/checkstyle/josm_checks.xml

    r16391 r18974  
    3232      <property name="checkHtml" value="false"/>
    3333    </module>
     34    <module name="MissingJavadocType"/>
    3435    <module name="NonEmptyAtclauseDescription"/>
    3536    <module name="AtclauseOrder"/>
     
    9697    <module name="FinalClass"/>
    9798    <module name="HideUtilityClassConstructor"/>
    98     <module name="org.openstreetmap.josm.TopLevelJavadocCheck"/>
    9999    <module name="SuppressionCommentFilter">
    100100      <property name="offCommentFormat" value="CHECKSTYLE\.OFF\: ([\w\|]+)"/>
  • trunk/tools/checkstyle/josm_filters.xml

    r16050 r18974  
    4545  <suppress checks="FileLengthCheck" files="DomainValidator\.java" />
    4646  <suppress checks="MissingDeprecatedCheck" files="package-info\.java" />
    47   <suppress checks="org.openstreetmap.josm.TopLevelJavadocCheck" files="package-info\.java" />
    48   <suppress checks="org.openstreetmap.josm.TopLevelJavadocCheck" files="[\\/]test[\\/]" />
    4947</suppressions>
Note: See TracChangeset for help on using the changeset viewer.