Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove baseline-findbugs #131

Merged
merged 2 commits into from
Mar 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 7 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

Baseline Java is a collection of Gradle plugins for configuring code quality tools in builds and generated
Eclipse/IntelliJ projects. It configures [Checkstyle](http://checkstyle.sourceforge.net) for style and formatting
checks, [FindBugs](http://findbugs.sourceforge.net/) for catching common bugs, and Eclipse/IntelliJ code style and
formatting configurations.
checks, and Eclipse/IntelliJ code style and formatting configurations.

The Baseline plugins are compatible with Gradle 2.2.1 and above.

Expand Down Expand Up @@ -47,18 +46,17 @@ apply plugin: 'com.palantir.baseline-config'
// Apply plugins selectively depending on required functionality.
apply plugin: 'com.palantir.baseline-checkstyle'
apply plugin: 'com.palantir.baseline-eclipse'
apply plugin: 'com.palantir.baseline-findbugs'
apply plugin: 'com.palantir.baseline-idea'
```

- Run ``./gradlew baselineUpdateConfig`` to download the config files
referenced in the `dependencies.baseline` configuration and extract them to .baseline/
- Any subsequent ``./gradlew build`` invokes Checkstyle and FindBugs as part of the build and test tasks (if the
- Any subsequent ``./gradlew build`` invokes Checkstyle as part of the build and test tasks (if the
respective baseline-xyz plugins are applied).
- The ``eclipse`` and ``idea`` Gradle tasks generate projects pre-configured with Baseline settings:

- Code style and code formatting rules conforming with Baseline style
- Checkstyle and FindBugs configuration
- Checkstyle configuration

Note that the Checkstyle-IDEA plugin is required to run the Baseline Checkstyle within IntelliJ.

Expand All @@ -68,7 +66,7 @@ respective baseline-xyz plugins are applied).
## Plugin Architecture Overview

The Baseline plugins `com.palantir.baseline-checkstyle`, `com.palantir.baseline-eclipse`,
`com.palantir.baseline-findbugs`, `com.palantir.baseline-idea` apply the configuration present in `.baseline` to the
`com.palantir.baseline-idea` apply the configuration present in `.baseline` to the
respective Gradle tasks. For example, any Gradle Checkstyle tasks uses the Checkstyle configuration in
`.baseline/checkstyle/checkstyle.xml`, and any IntelliJ/Eclipse project generated by `./gradlew eclipse idea` is
configured with Baseline code formatting and Checkstyle rules. Note that each of these plugins automatically applies the
Expand All @@ -81,7 +79,7 @@ applies `eclipse`, etc.

## Configuration

The standard Gradle configuration options for the underlying plugins (Eclipse, IntelliJ, Checkstyle, FindBugs) can be
The standard Gradle configuration options for the underlying plugins (Eclipse, IntelliJ, Checkstyle) can be
used, with the following exception:

- `checkstyle.configFile` - not compatible with Baseline since the file location is hard-coded to
Expand Down Expand Up @@ -169,10 +167,9 @@ The `com.palantir.baseline-eclipse` plugin automatically applies the `eclipse` p
If set, `sourceCompatibility` is used to configure the Eclipse project settings and the Eclipse JDK version. Note
that `targetCompatibility` is also honored and defaults to `sourceCompatibility`.

Generated Eclipse projects have default per-project code formatting rules as well as Checkstyle and FindBugs
configuration.
Generated Eclipse projects have default per-project code formatting rules as well as Checkstyle configuration.

The Eclipse plugin is compatible with the following versions: Checkstyle 6.5+, FindBugs 3.0.0+, JDK 1.7, 1.8
The Eclipse plugin is compatible with the following versions: Checkstyle 7.5+, JDK 1.7, 1.8


### IntelliJ Plugin (com.palantir.baseline-idea)
Expand All @@ -186,28 +183,6 @@ Generated IntelliJ projects have default per-project code formatting rules as we
and Java language level settings are picked up from the Gradle `sourceCompatibility` property on a per-module basis.


### FindBugs Plugin (com.palantir.baseline-findbugs)

Checks can be suppressed by annotating the class/method/field in question with:

```Java
@SuppressFBWarning("BUG_PATTERN_NAME")
```

The BUG_PATTERN_NAME can be derived from the "Pattern" field in the Eclipse Bug Info View.

More complicated filters can be handled via the `.baseline/findbugs/excludeFilter.xml` file; see [FindBugs
documentation](http://findbugs.sourceforge.net/manual/filter.html) for details.

We apply the [antipatterns](https://github.com/palantir/antipatterns) Gradle plugin; if you wish to change
the version of this plugin, please do so by adding

dependencies {
findbugsPlugins "com.palantir.antipatterns:$antipatternsVersion"
}

to your project dependencies.

### Copyright Checks

By default Baseline enforces Palantir copyright at the beginning of files. To change this, edit the template copyright
Expand Down
2 changes: 1 addition & 1 deletion docs/best-practices/java-coding-guidelines/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ See *Effective Java, 2nd Edition, Items 68-69*
Concurrency bugs are very difficult to reliably fix, as their
manifestations are very transient. By writing very simple
synchronization schemes, code inspection is much more effective to
detect and fix these issues. (Tools like FindBugs will also perform
detect and fix these issues. (Tools like Google's error-prone will also perform
better at detecting issues.)

Often times it is best to simply avoid explicit synchronization in the
Expand Down

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions gradle-baseline-java-config/resources/findbugs/excludeFilter.xml

This file was deleted.

6 changes: 1 addition & 5 deletions gradle-baseline-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pluginBundle {
website = 'https://github.com/palantir/gradle-baseline'
vcsUrl = 'https://github.com/palantir/gradle-baseline'
description = 'Baseline Java is a collection of Gradle plugins for configuring code quality tools in builds and generated Eclipse/IntelliJ projects.'
tags = ['java', 'checkstyle', 'code quality', 'findbugs', 'eclipse', 'idea']
tags = ['java', 'checkstyle', 'code quality', 'eclipse', 'idea']

plugins {
baselinePlugins {
Expand All @@ -85,10 +85,6 @@ pluginBundle {
id = 'com.palantir.baseline-eclipse'
displayName = 'Palantir Baseline Eclipse Plugin'
}
baselineFindbugsPlugin {
id = 'com.palantir.baseline-findbugs'
displayName = 'Palantir Baseline FindBugs Plugin'
}
baselineIdeaPlugin {
id = 'com.palantir.baseline-idea'
displayName = 'Palantir Baseline IntelliJ Plugin'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class Baseline implements Plugin<Project> {
void apply(Project project) {
project.plugins.apply BaselineCheckstyle
project.plugins.apply BaselineConfig
project.plugins.apply BaselineFindBugs
project.plugins.apply BaselineEclipse
project.plugins.apply BaselineIdea
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class BaselineEclipse extends AbstractBaselinePlugin {
}
})

// Configure Findbugs/Checkstyle/JdtUI settings by copying in the default Baseline config file.
// Configure Checkstyle/JdtUI settings by copying in the default Baseline config file.
// Warning: this may interfere with other Gradle plugins that may try to mutate these files.
project.afterEvaluate { Project p ->
def eclipseTemplate = project.task(
Expand Down
Loading