Giter Site home page Giter Site logo

bluej-checkstyle-plugin's Introduction

BlueJ-Checkstyle-Plugin

release license

checkstyle4bluej is a BlueJ plugin that allows you to use the Checkstyle source code analysis tool. The user is provided the ability to choose what Checkstyle configuration file to use.

Note: It is important that the configuration file is compatible with Checkstyle version 9.2.

overview-example

Installing the extension

  1. Download the latest version of the extension found here
  2. Move the downloaded JAR to a BlueJ extensions2 directory
  3. Start BlueJ

BlueJ Extensions can be installed in three different directories:

  • User directory installs for this user
  • System directory installs for all users of this system
  • Project directory installs for this project only

To install for a project, make a directory called extensions2 in the projects root directory and move the JAR to that directory.

In order to install for a user/system place the JAR in one of these directories:

Operating System Install-type Directories
Mac User $HOME/Library/Preferences/org.bluej/extensions2
System <BLUEJ_HOME>/BlueJ.app/Contents/Java/extensions2
Unix User $HOME/.bluej/extensions2
System <BLUEJ_HOME>/lib/extensions2
Windows User %USERNAME%\bluej\extensions2
System %PROGRAMFILES%\BlueJ\lib\extensions2

Tip: For Mac users, Control-click BlueJ.app and choose Show Package Contents to find the system directory.

For further information about Extensions in BlueJ see: BlueJ Extensions

Usage

The Checkstyle Plugin runs checks in BlueJ when a Project/Package is opened and when a class file's state changes. The plugin ignores files that have not been compiled.

You can view the violations discovered by choosing Show Checkstyle overview from the Tools menu.

show-example

From the overview window you can double-click a violation to highlight the text in the BlueJ editor.

Which configuration file to use can be defined in the BlueJ preferences.

You can find the preferences by choosing Preferences... from the Tools menu and navigating to the Extensions tab.

preferences-example

The selected default config will be loaded by default, but can be changed from the dropdown menu in the overview window.

current-config-example

Issues

Are you experiencing bugs/problems using this plugin?

Submit a bug report with detailed reproduction steps.

We also appreciate ideas of enhancements and new features, feel free to suggest new features here.

Contributing

Contributions are welcome. Feel free to discuss the changes with us in a feature request before submitting a Pull Request.

Dependencies

This plugin relies on the usage of the BlueJ Extensions2 API. The latest version is added to this repository in the lib directory. The bluejext2 jar is bundled with the BlueJ installation, it can be retrieved from there. Detailed instructions can be found in the BlueJ documentation.

A toolscript is available for Windows users to update the API, it can also be used as a reference as on how to install new versions of the API to the lib directory.

The current version of the API is version 3.2, from version 5.0.2 of BlueJ.

Note: the script assumes BlueJ is installed for all users.

A lot of core functionality for this plugin is provided by BlueJ-Linting-Core, feel free to take a look at it as well.

bluej-checkstyle-plugin's People

Contributors

thedatasnok avatar astyve avatar actions-user avatar github-actions[bot] avatar

Watchers

Girts Strazdins avatar  avatar

bluej-checkstyle-plugin's Issues

Autoloading configs

It would be great, if plugin supports autoloading configs from some predefined path.

We are making custom BlueJ installation package for our students to make them all use the same IDE and checkstyle configuration.

It was possible to preconfigure checkstyle in the old BlueJ 4 checkstyle plugin by including default_checks.xml file in the BlueJ extensions directory.

I found no way to include custom checkstyle config in this extension as the extension expects absolute path in extensions.no.ntnu.iir.bluej.extensions.linting.checkstyle.CheckstyleExtension.settings.Checkstyle.ConfigMap configuration option

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.