eo icon indicating copy to clipboard operation
eo copied to clipboard

Fix checkstyle warnings for `ExprReduce`

Open mximp opened this issue 3 years ago • 6 comments

Split from https://github.com/objectionary/eo/issues/739

Refactor the class to pass all checkstyle checks. Current warnings:

[INFO] Checkstyle: src/main/java/org/eolang/ExprReduce.java[83]: More than 3 parameters (found 5). (ParameterNumberCheck)
[INFO] Checkstyle: src/main/java/org/eolang/ExprReduce.java[104]: More than 3 parameters (found 4). (ParameterNumberCheck)

mximp avatar Jul 18 '22 08:07 mximp

@potatmen please assist

mximp avatar Aug 11 '22 12:08 mximp

@mximp when does this warning occur? During the compiling like this mvn clean test?

potatmen avatar Aug 11 '22 12:08 potatmen

You can run qulice:check maven goal on eo-runtime after commenting checkstyle exclusion in pom.xml:

<profiles>
    <profile>
      <id>qulice</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-maven-plugin</artifactId>
            <configuration>
              <excludes>
<!--                <exclude>checkstyle:.*</exclude>-->
                <exclude>checkstyle:/src/test/.*</exclude>
                <exclude>pmd:.*</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

mximp avatar Aug 11 '22 12:08 mximp

Enable Checkstyle validation for eo-runtime

In eo-runtime/pom.xml comment out exclude:

<profiles>
    <profile>
      <id>qulice</id>
      <build>
        ...
            <artifactId>qulice-maven-plugin</artifactId>
            <configuration>
              <excludes>
<!--                <exclude>checkstyle:.*</exclude>-->
                <exclude>checkstyle:/src/test/.*</exclude>
                <exclude>pmd:.*</exclude>
              </excludes>
            </configuration>
      ...
      </build>
    </profile>
  </profiles>

Run qulice:check goal

Within eo-runtime folder execute the following command:

mvn qulice:check -P qulice

This will produce the list of errors from Checkstyle. Find the ones you are interested in.

mximp avatar Aug 11 '22 14:08 mximp

@mximp Thanks for the clarification

potatmen avatar Aug 11 '22 14:08 potatmen

@mximp done https://github.com/objectionary/eo/pull/1032

potatmen avatar Aug 11 '22 22:08 potatmen

Thanks @potatmen!

mximp avatar Aug 19 '22 15:08 mximp

@mximp I haven't actually fixed it yet

potatmen avatar Aug 19 '22 15:08 potatmen

@potatmen was the merge for?

mximp avatar Aug 22 '22 10:08 mximp

@yegor256 this one is completed.

mximp avatar Aug 23 '22 16:08 mximp