Coder Social home page Coder Social logo

cleanthat's Introduction

CleanThat

Purpose

Cleanthat is a project enabling automatic code cleaning, from formatting to refactoring.

Beware CleanThat currently refers to 2 sub-projects:

  1. Cleanthat Refactorer: A library enabling Java linting rules/mutators
  2. Cleanthat HouseKeeper: A GitHub App enabling automatic house-keeping of your Git repository, for various languages, given external linting engines (e.g. Spotless, OpenRewrite, Cleanthat Refactorer, etc)

List of mutators

javadoc

MUTATORS.generated.MD

Motivation

The point of this project is to enable automatic cleaning of your code-base. By cleaning, we include :

  1. formatting (with an Eclipse stylesheet, Google-Java-Format, etc)
  2. linting (given any IMutator)
  3. refactoring (WIP)
  4. migrating (from JUnit4 to JUnit5)

As of 2022-12, it focuses on Java projects, but enabling formatting various languages through Spotless.

Related projects:

Changes

See CHANGES.MD

  • 2023-03-23: 2.12 Latest release
  • ...
  • 2023-02-06: 2.0 Major Release leveraging from/to Spotless
  • ...
  • 2021-08-12: 1.0 Initial Release

Language Coverage

As a Robot (Cleanthat HouseKeeper)

Cleanthat HouseKeeper is currently compatible with the following languages:

  • java (Spotless and OpenRewrite)
  • pom.xml (Spotless)
  • json (Spotless)
  • xml (Spotless)
  • yaml (Spotless)
  • kotlin (Spotless)

see FormatterFactory

As a library (Cleanthat Refactorer)

Cleanthat Refactorer is currently compatible with the following languages:

  • java (Cleanthat)
  • java (OpenRewrite)
  • java (Eclipse Cleanup)

Limitations

  • CleanThat processes files individually, which indices limited Type resolution. This enables cleaning files on a per-impacted-file basis (e.g. in a Github Pull-Request).
  • The type resolution may be lifted through cleanthat-maven-plugin (TODO)
  • The project jhas poor support of charset others than UTF-8

Installation

Maven (Free)

Spotless mvn plugin (for pure mvn users)

mvn integration is available through Spotless: https://github.com/diffplug/spotless/tree/main/plugin-maven#cleanthat

Maven central

One can then clean its codebase with mvn spotless:apply

Cleanthat mvn plugin (for GitHub App users)

See README: https://github.com/solven-eu/cleanthat/tree/master/maven

Maven Central(https://mvnrepository.com/artifact/io.github.solven-eu.cleanthat/cleanthat-maven-plugin)

Features :

  • Apply full refactoring as it would be executed by the Github App, based on .cleanthat configuration
  • Generate automatically an optimal Eclipse stylesheet based on your code-case

One liner (even without a pom.xml):

    mvn io.github.solven-eu.cleanthat:cleanthat-maven-plugin:cleanthat

or simply mvn cleanthat:apply

Gradle (Free)

gradle integration is available through Spotless: https://github.com/diffplug/spotless/tree/main/plugin-gradle#cleanthat

Gradle plugin

Github App (Free+Paid)

If your repository is hosted by Github.com, get zero-configuration cleaning with our Github App on Github marketplace.

It can configured through a /.cleanthat/cleanthat.yaml file at the root of the repository (e.g. https://github.com/solven-eu/cleanthat/blob/master/.cleanthat/cleanthat.yaml).

It differs from mvn/gradle integration by fetching only relevant (e.g. modified) files, based on Github Events.

Key Features

  • Automatic generation of the initial configuration
  • Clean branches which are not protected and head of a PullRequest

Example configurations of happy Users:

CI/CD (Github Actions, CircleCI, Jenkins, etc)

If you integrated Cleanthat through its maven or gradle options, you can get automatic remote cleaning with:

    ./mvnw spotless:check || ./mvnw spotless:apply && git commit -m"Spotless" && git push

Configuration

Default configuration: SafeAndConsensualMutators

By default, we rely on a safe and consensual configuration. This composite mutators should be integrated by all projects as most projects would benefit from these rules, and most developers would agree this is better style.

Spotless:

cleanthat()
	[...]
	.addMutator('SafeAndConsensual')

Customizations

Most integrations enable:

  1. Adding some mutators
  2. Excluding some mutators
  3. Activating isDraft mutators (which is false by default, not to include not-production-ready mutators)

Spotless:

cleanthat()
	[...]
	.addMutator('SafeAndConsensual')
	.includeMutator('StreamForEachNestingForLoopToFlatMap')
	.excludeMutator('UseCollectionIsEmpty')
	.includeDraft(true) 

More composite mutators

SafeButNotConsensualMutators relates to SafeAndConsensualMutators, but it includes also some rules which may be rejected by a minority of developers.

Spotless:

cleanthat()
	[...]
	.addMutator('SafeAndConsensual')
	.addMutator('SafeButNotConsensual')

SafeButControversialMutators relates to SafeButNotConsensualMutators, but it includes also some rules which may be rejected by a majority of developers. This may be due to eager use of new language syntax.

Spotless:

cleanthat()
	[...]
	.addMutator('SafeAndConsensual')
	.addMutator('SafeButNotConsensual')
	.addMutator('SafeButControversial')

Activate all mutators

One may switch to activate all mutators. This can be achieved through:

Spotless:

cleanthat()
	[...]
	.addMutator('SafeAndConsensual')
	.addMutator('SafeButNotConsensual')
	.addMutator('SafeButControversial')
	.includeDraft(true) 

Key design decisions

As of 2022-12, this projects focuses on typical JVM projects. Hence, it enables:

  • Advanced Linting of .java files
  • Advanced Formatting of .java files (through Spotless)
  • Advanced Formatting of pom.xml files (through Spotless)
  • Basic Formatting of .json, .xml, etc files (through Spotless)

Refactoring on a per-single-source file basis

One major goal of this project is to enable incremental refactoring on a per Pull-Request basis. Hence, the availability of the whole code-base and related binaries (e.g. mvn dependencies) is limited. Cleanthat focuses on cleaning individual source files.

Limitations :

  • Can not refactor based on multiple source files information (e.g. type definition in a different file)
  • Can not refactor based on binaries information (e.g. type definition from dependencies)
  • Can refactor based on standard JRE classpath

Github App does not rely on Maven and Gradle

While we work on integrating CleanThat into Spotless, the Github CleanThat App does not rely on existing Maven (https://github.com/diffplug/spotless/tree/main/plugin-maven) and Gradle (https://github.com/diffplug/spotless/tree/main/plugin-gradle) plugins. The main reason for that is security. Indeed, while it would enable very setup over a project already integrating Spotless, it would open dangerous security breach as one could easily inject custom code as dependency of the maven/gradle plugin, which would enable one to extract CleanThat secrets (Github token, GPG key, etc).

About Advanced Formatting of .java files

Refactoring .java files would break the code conventions. Hence, any refactoring operation should be followed by a formatting operation. With mvn integration, once should follow the cleanthat step with some mvn formatter step. With github integration, once may rely on CleanThat own .java formatting abilities.

There is multiple good options for formatting Java files:

Last considerations

This software is provided WITHOUT ANY WARRANTY, and is available under the Apache License, Version 2. Any code loss caused by using this plugin is not the responsibility of the author(s). Be sure to use some source repository management system such as GIT before using this plugin.

Contributions are welcome.

Using Eclipse Formatter

An alternative to spring_formatter is eclipse_formatter. It takes as parameter an url like:

A public http(s) URL:

    https://raw.githubusercontent.com/solven-eu/pepper/master/static/src/main/resources/eclipse/eclipse_java_code_formatter.xml

A file in local repository (root being assumed based on Git root/Maven top module)

    code:/static/src/main/resources/eclipse/eclipse_java_code_formatter.xml

Eclipse Stylesheets can exported to XML through:

  • Go into Preferences
  • Select Java > Code Style > Formatter
  • Click on 'Export All'

CleanThat will accept only configuration with a single profile in them. If multiple profiles are found, we will rely on the first profile.

Automatic generation of Eclipse Stylesheet

The maven plugin enables generating an Eclipse Stylesheet minimizing changes over a clean repository:

    mvn io.github.solven-eu.cleanthat:cleanthat-maven-plugin:eclipse_formatter-stylesheet

see maven/README.MD

Disclaimer

cleanthat is fairly new. While it is tested on many large projects, you may encounter issues of all kinds. Please report them.

codecov

cleanthat's People

Contributors

benoitmitrust avatar blacelle avatar cleanthat[bot] avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cleanthat's Issues

Additional Static Mutator HideUtilityClassConstructor

If existing, a reference to the rule from the external system :


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

Guava Strings.padStart

Strings.repeat("0", LENGTH_SIREN - asString.length()) + asString

->

Strings.padStart(asString, LENGTH_SIREN, '0')

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Clean branches even without a Pull-Request

see eu.solven.cleanthat.code_provider.github.event.GithubWebhookHandler.computeRelevantBaseBranches(IExternalWebhookRelevancyResult, GitRepoBranchSha1, GithubRepositoryFacade, Optional<GitPrHeadRef>)

For now, we clean branches only if:

  1. it is not protected (as per Cleanthat configuration)
  2. it is not protected (as per Github rules)
  3. is head of at least one PullRequest

This behavior may be unexpected by some customer, which would expect any branch to be cleaned. This may be activated for paying plans (else it may be too costly).

This behavior is also a reason why pull_request events can trigger a clean: as the previous push event 9with no pull_request) did not triggered a cleaning, the pull_request (re)open event should trigger it.

Additional Static Mutator PMD AppendCharacterWithChar

If existing, a reference to the rule from the external system :

  • AppendCharacterWithChar

Please also provide code examples before -> after.


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

Additional Static Mutator PMD AddEmptyString

If existing, a reference to the rule from the external system :

  • AddEmptyString

Please also provide code examples before -> after.


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

Prevent overwriting Files

For now, the Bot will not prevent itself writing over a file. More precisely, if a File is changed by 2 consecutive commits, the first commit event may trigger a cleanthat step, which may override the 2 committed file.

This would lead to unexpected result especially if the second commit clean that event is faster that the first commit cleanthat event. For instance:

  1. Commit FileA-v1
  2. Commit FileA-v2
  3. CleanThat FileA-v2
  4. CleanThat FileA-v1

In this chain of event, the repository will keep FileA-v1 as last File, which is erroneous.

Cleanthat may:

  1. Never commit a File if it has been written in the meantime
  2. Hence, rely on the last cleanthat event over each considered File

This logic has to be done on a per File basis, as not all commits would cover the same FileSet:

  1. Commit_1 FileA-v1 FileB-v1
  2. Commit_2 FileA-v2
  3. CleanThat_2 FileA-v2
  4. CleanThat_1 FileB-v1 <-- This even should skip FileA-v1, but still process FileB-v1

Add validation to step, to detect IMutator corrupting the code

PMD Rule:UnusedNullCheckInEquals

status != null && "hardcoded".equals(status)

[INFO] PMD version: 6.28.0
[INFO] PMD Failure: SomeClass:123 Rule:UnusedNullCheckInEquals Priority:3 Invoke equals() on the object you've already ensured is not null.

This rule looks quite easy to implement.

Additional Static Mutator System.currenTimeMillis() -> System.nanoTime()

spotbugs/spotbugs#2308

I'm not aware of a related rule in existing static code analysis.

System.currentTimeMillis() -> System.nanoTime() / 1_000_000


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

Additional Static Mutator PMD InefficientStringBuffering

If existing, a reference to the rule from the external system :

Please also provide code examples before -> after.


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

[Feature Request] Ability to order IMutators

Some mutators would preferablr applied before another mutator.

For instance :

Turning username.equals("") into "".equals(username)

should happens after

Turning username.equals("") into username.isEmpty()

PMD.UnnecessaryFullyQualifiedName

Rule:UnnecessaryFullyQualifiedName Priority:4 Unnecessary use of fully qualified name 'java.lang.Enum' due to existing implicit import 'java.lang.*'.

Additional Static Mutator YYY

If existing, a reference to the rule from the external system :

Please also provide code examples before -> after.


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

PMD Rules

AvoidInlineConditionals: we may automatically clean ternary operators.

NeedBraces: we may automatically add braces

Additional Static Mutator UnnecessaryCaseChange

If existing, a reference to the rule from the external system :


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

PMD.UserProperClassLoader

Rule:UseProperClassLoader Priority:3 In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead..

Additional Static Mutator AvoidMultipleUnaryOperators

If existing, a reference to the rule from the external system :

Please also provide code examples before -> after.


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Package lookup failures

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency com.amazonaws:aws-java-sdk-bom to v1.12.771
  • Update dependency com.github.javaparser:javaparser-symbol-solver-core to v3.26.2
  • Update dependency nl.jqno.equalsverifier:equalsverifier to v3.16.2
  • Update dependency com.puppycrawl.tools:checkstyle to v10.18.1
  • Update dependency org.checkerframework:checker-qual to v3.47.0
  • Update dependency org.kohsuke:github-api to v1.324
  • Update dependency org.openrewrite.maven:rewrite-maven-plugin to v5.39.2
  • Update google (com.google.guava:guava, com.google.errorprone:error_prone_core)
  • Update sentry to v7.14.0 (io.sentry:sentry-logback, io.sentry:sentry-spring-boot-starter)
  • Update mvn to v2 (major) (org.apache.maven.resolver:maven-resolver-transport-file, org.apache.maven.resolver:maven-resolver-connector-basic, org.apache.maven.resolver:maven-resolver-impl, org.apache.maven.resolver:maven-resolver-util, org.apache.maven.resolver:maven-resolver-spi, org.apache.maven.resolver:maven-resolver-api)
  • Update pmd.version to v7 (major) (net.sourceforge.pmd:pmd-core, net.sourceforge.pmd:pmd-xml, net.sourceforge.pmd:pmd-java)
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Warning

Renovate failed to look up the following dependencies: Failed to look up maven package fr.jmini.ecentral:eclipse-platform-dependencies.

Files affected: pom.xml


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/maven.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • codecov/codecov-action v4
maven
annotations/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
any-language/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
code-cleaners/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
code-providers/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • com.google.jimfs:jimfs 1.3.0
  • com.google.code.findbugs:annotations 3.0.1u2
config/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
git/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
github/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • org.kohsuke:github-api 1.323
  • io.jsonwebtoken:jjwt-impl 0.12.6
  • io.jsonwebtoken:jjwt-jackson 0.12.6
  • com.google.code.findbugs:annotations 3.0.1u2
  • org.bouncycastle:bcpkix-jdk15on 1.70
gitlab/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • org.gitlab4j:gitlab4j-api 5.6.0
java-eclipse/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • com.google.code.findbugs:annotations 3.0.1u2
  • org.apache.commons:commons-digester3 3.2
  • io.github.java-diff-utils:java-diff-utils 4.12
  • org.apache.commons:commons-text 1.12.0
java/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • fr.inria.gforge.spoon:spoon-core 10.4.2
  • com.github.javaparser:javaparser-symbol-solver-core 3.26.1
  • com.google.code.findbugs:annotations 3.0.1u2
kotlin/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.21
  • com.github.kotlinx:ast 0.1.0
  • org.jetbrains.kotlin:kotlin-maven-plugin 1.9.25
  • org.apache.maven.plugins:maven-compiler-plugin 3.12.1
lambda/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • com.amazonaws:aws-lambda-java-core 1.2.3
  • org.json:json 20231013
  • com.github.seratch:jslack-api-client 3.4.2
  • com.github.tomakehurst:wiremock-jre8-standalone 2.35.2
  • org.springframework.boot:spring-boot-maven-plugin 2.7.18
  • com.github.seanroy:lambda-maven-plugin 2.3.5
local/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
maven/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • org.apache.maven.plugin-tools:maven-plugin-annotations 3.11.0
  • com.google.code.findbugs:annotations 3.0.1u2
  • org.codehaus.plexus:plexus-utils 3.5.1
  • org.apache.maven.plugin-testing:maven-plugin-testing-harness 3.3.0
  • org.apache.maven.plugins:maven-plugin-plugin 3.11.0
openrewrite/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • org.openrewrite.recipe:rewrite-recipe-bom 2.5.4
parent/pom.xml
  • io.github.solven-eu.pepper:pepper 4.5
  • io.github.solven-eu.pepper:pepper 4.5
  • io.github.solven-eu.pepper:pepper 4.5
  • io.github.solven-eu.pepper:pepper 4.5
  • io.github.solven-eu.pepper:pepper-with-agent 4.5
  • io.github.solven-eu.pepper:pepper 4.5
  • io.github.solven-eu.pepper:pepper 4.5
  • io.github.solven-eu.pepper:pepper-unittest 4.5
  • org.springframework.boot:spring-boot-starter-parent 2.7.18
  • com.mycila:license-maven-plugin 4.5
  • com.github.spotbugs:spotbugs-maven-plugin 4.8.2.0
  • io.github.solven-eu.pepper:pepper-static 4.5
  • org.apache.maven.plugins:maven-checkstyle-plugin 3.3.1
  • io.github.solven-eu.pepper:pepper-static 4.5
  • com.puppycrawl.tools:checkstyle 10.17.0
  • org.apache.maven.plugins:maven-pmd-plugin 3.21.2
  • io.github.solven-eu.pepper:pepper-static 4.5
  • net.sourceforge.pmd:pmd-java 6.55.0
  • net.sourceforge.pmd:pmd-xml 6.55.0
  • net.sourceforge.pmd:pmd-core 6.55.0
  • io.github.solven-eu.cleanthat:cleanthat-maven-plugin 2.22-SNAPSHOT
  • com.diffplug.spotless:spotless-maven-plugin 2.43.0
  • io.github.solven-eu.pepper:pepper-static 4.5
  • org.openrewrite.maven:rewrite-maven-plugin 5.36.0
  • org.apache.maven.plugins:maven-gpg-plugin 3.2.0
  • org.apache.maven.plugins:maven-javadoc-plugin 3.6.3
  • org.sonatype.plugins:nexus-staging-maven-plugin 1.7.0
  • com.google.errorprone:error_prone_core 2.29.2
  • io.github.solven-eu.pepper:pepper-unittest 4.5
pom.xml
  • fr.jmini.ecentral:eclipse-platform-dependencies 4.25
  • org.apache.maven:maven-compat 3.9.6
  • io.github.solven-eu.cleanthat:parent 2.22-SNAPSHOT
  • org.springframework.cloud:spring-cloud-dependencies 2021.0.9
  • com.amazonaws:aws-java-sdk-bom 1.12.765
  • org.checkerframework:checker-qual 3.45.0
  • com.nimbusds:nimbus-jose-jwt 9.40
  • com.google.guava:guava 33.2.1-jre
  • org.apache.maven:maven-plugin-api 3.9.6
  • org.apache.maven:maven-core 3.9.6
  • org.apache.maven:maven-model 3.9.6
  • org.apache.maven:maven-resolver-provider 3.9.6
  • org.apache.maven.resolver:maven-resolver-api 1.9.18
  • org.apache.maven.resolver:maven-resolver-spi 1.9.18
  • org.apache.maven.resolver:maven-resolver-util 1.9.18
  • org.apache.maven.resolver:maven-resolver-impl 1.9.18
  • org.apache.maven.resolver:maven-resolver-connector-basic 1.9.18
  • org.apache.maven.resolver:maven-resolver-transport-file 1.9.18
  • org.apache.maven.resolver:maven-resolver-transport-http 1.9.18
  • org.apache.maven.plugins:maven-compiler-plugin 3.12.1
  • org.jacoco:jacoco-maven-plugin 0.8.12
  • io.github.git-commit-id:git-commit-id-maven-plugin 8.0.2
  • io.sentry:sentry-spring-boot-starter 7.12.1
  • io.sentry:sentry-logback 7.12.1
refactorer-test-helpers/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • com.github.javaparser:javaparser-symbol-solver-core 3.26.1
  • com.google.code.findbugs:annotations 3.0.1u2
  • io.github.java-diff-utils:java-diff-utils 4.12
refactorer/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • org.codehaus.plexus:plexus-java 1.2.0
  • com.google.code.findbugs:annotations 3.0.1u2
  • io.github.java-diff-utils:java-diff-utils 4.12
  • org.apache.commons:commons-text 1.12.0
runnable/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • com.google.code.findbugs:annotations 3.0.1u2
spotless/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • com.diffplug.spotless:spotless-lib 2.45.0
  • com.diffplug.spotless:spotless-lib-extra 2.45.0
  • com.diffplug.durian:durian-core 1.2.0
  • com.googlecode.concurrent-trees:concurrent-trees 2.6.1
test-helpers/pom.xml
  • io.github.solven-eu.cleanthat:aggregator-cleanthat 2.22-SNAPSHOT
  • nl.jqno.equalsverifier:equalsverifier 3.16.1
  • org.bitbucket.cowwoc:diff-match-patch 1.2

  • Check this box to trigger a request for Renovate to run again on this repository

RedundantModifiers removes static from methods in interfaces

Sorry for not giving more details. I'm only on my phone now but don't want to forget this.

Basically cleanthat removes a "static" modifier from methods in interfaces which breaks builds for us.

I can try to provide a simple example later.

Additional Static Mutator - InstanceOf Pattern Matching

If existing, a reference to the rule from the external system :


You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.