Skip to content

Added checkstyle usage instructions to README #42

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,27 @@ Even if you are not using code obfuscation, you can still use this gem to map
Java class names to their original file paths, as Java stack traces do not
include the full path to source files, which Squash needs to perform its
Git-blame magic.

How to use the checkstyle linter ?
---------------------------------
## 🧪 Code Style & Linting (Checkstyle)

This project uses [Checkstyle](https://checkstyle.org/) to ensure consistent code formatting and style.

### ✅ Run Checkstyle Locally

1. *Download* the Checkstyle JAR file:
[checkstyle-10.12.3-all.jar](https://github.com/checkstyle/checkstyle/releases)

2. *Run the Checkstyle command* from the root directory of this project:

bash
java -jar checkstyle-10.12.3-all.jar -c checkstyle.xml PATH_TO_JAVA_FILES


> Replace PATH_TO_JAVA_FILES with the folder where .java files are located (e.g., src/, algorithms/, or app/).

### 🧰 Tip
You can create a script (like checkstyle.bat or lint.sh) to automate this process.

Keeping code clean and well-styled helps everyone contribute more efficiently. 🙂