{"id":20023086,"url":"https://github.com/mebigfatguy/fb-contrib","last_synced_at":"2025-05-16T09:02:57.332Z","repository":{"id":2356261,"uuid":"2094401","full_name":"mebigfatguy/fb-contrib","owner":"mebigfatguy","description":"a FindBugs/SpotBugs plugin for doing static code analysis for java code bases","archived":false,"fork":false,"pushed_at":"2025-05-09T22:23:27.000Z","size":12539,"stargazers_count":157,"open_issues_count":62,"forks_count":45,"subscribers_count":20,"default_branch":"spotbugs","last_synced_at":"2025-05-09T23:26:36.029Z","etag":null,"topics":["findbugs","findbugs-plugin","java","static-code-analysis"],"latest_commit_sha":null,"homepage":"http://fb-contrib.sf.net","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mebigfatguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-07-23T20:16:16.000Z","updated_at":"2025-05-09T22:23:30.000Z","dependencies_parsed_at":"2024-01-04T18:31:11.743Z","dependency_job_id":"2973d8ee-fff4-41fa-9657-cc62a3879ff2","html_url":"https://github.com/mebigfatguy/fb-contrib","commit_stats":{"total_commits":3211,"total_committers":27,"mean_commits":"118.92592592592592","dds":0.1124260355029586,"last_synced_commit":"21619da1d884ef137dc19e092087511f9cf2ba87"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mebigfatguy%2Ffb-contrib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mebigfatguy%2Ffb-contrib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mebigfatguy%2Ffb-contrib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mebigfatguy%2Ffb-contrib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mebigfatguy","download_url":"https://codeload.github.com/mebigfatguy/fb-contrib/tar.gz/refs/heads/spotbugs","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501552,"owners_count":22081527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["findbugs","findbugs-plugin","java","static-code-analysis"],"created_at":"2024-11-13T08:44:15.247Z","updated_at":"2025-05-16T09:02:57.303Z","avatar_url":"https://github.com/mebigfatguy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"fb-contrib\n==========\n\n[![Build Status](https://travis-ci.org/mebigfatguy/fb-contrib.svg?branch=master)](https://travis-ci.org/mebigfatguy/fb-contrib)\n[![Open Source Helpers](https://www.codetriage.com/mebigfatguy/fb-contrib/badges/users.svg)](https://www.codetriage.com/mebigfatguy/fb-contrib)\n\na FindBugs and SpotBugs plugin for doing static code analysis on java byte code.\nFor information see http://fb-contrib.sf.net\n\n\n\nAvailable on [maven.org](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.mebigfatguy.fb-contrib%22%20AND%20a%3A%22fb-contrib%22)\n\nfor FindBugs:\n\n       GroupId: com.mebigfatguy.fb-contrib\n    ArtifactId: fb-contrib\n       Version: 7.6.10\n       \nFor SpotBugs\n\n       GroupId: com.mebigfatguy.sb-contrib\n    ArtifactId: sb-contrib\n       Version: 7.6.10\n       \nDeveloper\n* Dave Brosius\n\n\nContributors\n* Bhaskar Maddala\n* Chris Peterson\n* Grzegorz Slowikowski\n* Trevor Pounds\n* Ronald Blaschke\n* Zenichi Amano\n* Philipp Wiesemann\n* Kevin Lubick\n* Philippe Arteau\n* Thrawn\n* Juan Martin Sotuyo Dodero\n* Richard Fearn\n* Mikkel Kjeldsen\n* Jeremy Landis\n* Peter Hermsdorf\n* David Burström\n* Venkata Gajavalli\n* Rubén López\n* Pavel Roskin\n* Kevin Seymour\n* Piotrek Żygieło\n* Guillaume Toison\n* Judit Knoll\n\n\nfb-contrib has two main branches, 'findbugs' and 'spotbugs'. Code is committed to spotbugs, and then merged back to findbugs.\nIt is preferable therefore to create merge requests against the spotbugs branch. Thanks!\n\n\n## Setting up for Development - Ant\n1. Download/install [Eclipse](https://www.eclipse.org/home/index.php), ideally 4.3 (Kepler) or newer.  The standard release (for Java) will work fine.\n2. **Ant Dependencies** Download [yank, the dependency manager](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.mebigfatguy.yank%22%20AND%20a%3A%22yank%22) and [bug-rank-check-style](https://bitbucket.org/klubick/bugrankcheckstyle/downloads).  Both jars (v1.2.0+ and v1.0.0+) should go in your ~/.ant/lib folder, which you will have to make if it doesn't exist.  Windows people, this goes under [Username]/.ant/lib.\nDon't have more than one version of either jar in this folder, as it's not clear which one Ant will load, leading to annoying compatibility issues. This can be done using the ant target **ant infra_jars**\n3. [Fork](https://help.github.com/articles/fork-a-repo) this git repo and clone it.  [GitHub for Windows](https://windows.github.com/) or [GitHub for Mac](https://mac.github.com/) are good clients if you don't already have one.\n4. Open Eclipse.  File\u003eImport and then choose \"Existing projects into workspace\", and find the fb-contrib folder you created in step 3.  Ignore any compile errors (for now).\n5. Using git, clone the FindBugs repository using `git clone https://code.google.com/p/findbugs/`  You will only need the findbugs subfolder (the one that has README.txt in it).  You can delete the rest, if you wish.\n6. Import this project into Eclipse as well.  You may wish to [mark these files as read-only](https://cloud.githubusercontent.com/assets/6819944/3866638/801ae098-1fdc-11e4-9fce-1fdecb81402f.gif), so you modify the \"correct\" files.\n7. In the fb-contrib project, find the `user.properties.example` file.  Make a copy of it named user.properties (this will not be tracked by version control). Modify the findbugs.dir property to where ever you have the FindBugs distribution installed.  This is the [executable FindBugs](http://findbugs.sourceforge.net/downloads.html) folder, *not* the source folder.  The jar will be \"installed\" to (findbugs.dir)\\plugin.\nFor example, If you are using FindBugs with Eclipse (and you extracted Eclipse to C:\\\\), you'll set this to something like `findbugs.dir=/eclipse/plugins/edu.umd.cs.findbugs.plugin.eclipse_3.0.0.20140706-2cfb468`\n8. Finally, build fb-contrib by finding the [build.xml](https://github.com/mebigfatguy/fb-contrib/blob/spotbugs/build.xml) file in Eclipse, right-click it, and select Run As \u003e Ant Build.  The dependencies needed should be downloaded to fb-contrib/lib and the fb-contrib-VERSION.jar should be built.\n\n## Setting up for Development - Maven\n1. Download/install [Maven](https://maven.apache.org), version 2.2.1 or newer.\n2. Clone the Git repository, as per step 3 above.\n3. Run `mvn clean install` in the fb-contrib directory.\n\n## Usage - Maven\n\nTo include the fb-contrib detectors when checking your project with FindBugs, you can use the [FindBugs Maven plugin](https://gleclaire.github.io/findbugs-maven-plugin/usage.html).\nThe group ID for fb-contrib is com.mebigfatguy.fb-contrib, and the artifact ID is fb-contrib. Eg:\n\n~~~~\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.codehaus.mojo\u003c/groupId\u003e\n    \u003cartifactId\u003efindbugs-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.4\u003c/version\u003e\n    \u003cconfiguration\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003ecom.mebigfatguy.fb-contrib\u003c/groupId\u003e\n                \u003cartifactId\u003efb-contrib\u003c/artifactId\u003e\n                \u003cversion\u003e7.6.10\u003c/version\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n    \u003c/configuration\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003echeck\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n~~~~\n\nOr to include the fb-contrib detectors when checking your project with Spotbugs, you can use the [SpotBugs Maven plugin](https://github.com/spotbugs/spotbugs-maven-plugin) which is a fork of findbugs maven plugin to provide spotbugs integration.\nThe group ID for sb-contrib is com.mebigfatguy.sb-contrib, and the artifact ID is sb-contrib. Eg:\n\n~~~~\n\u003cplugin\u003e\n    \u003cgroupId\u003ecom.github.spotbugs\u003c/groupId\u003e\n    \u003cartifactId\u003espotbugs-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e4.9.1.0\u003c/version\u003e\n    \u003cconfiguration\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003ecom.mebigfatguy.sb-contrib\u003c/groupId\u003e\n                \u003cartifactId\u003esb-contrib\u003c/artifactId\u003e\n                \u003cversion\u003e7.6.10\u003c/version\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n    \u003c/configuration\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003echeck\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n~~~~\n\n\n## Usage - Gradle\n\n~~~~\napply plugin: 'findbugs'\n\ndependencies {\n    // We need to manually set this first, or the plugin is not loaded\n    findbugs 'com.google.code.findbugs:findbugs:3.0.0'\n    findbugs configurations.findbugsPlugins.dependencies\n\n    // To keep everything tidy, we set these apart\n    findbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.6.10'\n}\n\ntask findbugs(type: FindBugs) {\n   // Add all your config here ...\n\n   pluginClasspath = project.configurations.findbugsPlugins\n}\n~~~~\n## Contributing\nOnce you have the dev environment set up, feel free to make changes and pull requests.\nAny edits are much appreciated, from finding typos, to adding examples in the [messages](https://github.com/mebigfatguy/fb-contrib/blob/spotbugs/etc/messages.xml), to creating new detectors, all help is welcome.\n\nExternal guides for making detectors:\n- [https://www.ibm.com/developerworks/library/j-findbug2/](https://web.archive.org/web/20200809120657/https://www.ibm.com/developerworks/library/j-findbug2/)\n\nFor making detectors, it best to make several test cases, like those in the [sample directory](https://github.com/mebigfatguy/fb-contrib/tree/spotbugs/src/samples/java/ex).  Even better is if you can comment where you expect bug markers to appear and why, like [this](https://github.com/mebigfatguy/fb-contrib/blob/717f757d69c098e1baf786d3e7c03efacf2bbfaf/samples/HES_Sample.java#L313).\n\nIn your pull request, give an overview of your changes along with the related commits.\n\n\u003e If you are not up for contributing code but notice a common problem with some third party library, or general purpose pattern, please add an issue too. We always like new ideas.\n\n\nOften available on #fb-contrib on freenode.net for conversation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmebigfatguy%2Ffb-contrib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmebigfatguy%2Ffb-contrib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmebigfatguy%2Ffb-contrib/lists"}