Skip to content

Set Up Linters and Code Style Checkers #16

Description

@mikepapadim

Introduce basic code quality tools for both Java and Python code in the repo. This helps ensure formatting and best practices are followed consistently across contributors.

✅ Tasks

You don’t need to do all of them in one go — even completing just one is helpful!

0️⃣ Java Linter & Formatter

  • Add Checkstyle using the default or Google style in pom.xml or build.gradle
  • Add config file (e.g., checkstyle.xml)
  • Add GitHub Action to run mvn checkstyle:check or gradle check

1️⃣ Java Auto-Formatter

  • Add Spotless (Google Java Format) via Gradle or Maven
  • Add commands like ./gradlew spotlessApply or mvn spotless:apply

2️⃣ Python Formatter (for auxiliary Python scripts)

  • Add Black formatter (black .)
  • Add a GitHub Action to check formatting, e.g.:
name: Python Format Check

on: [push, pull_request]

jobs:
  black-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install Black
        run: pip install black
      - name: Check formatting with Black
        run: black --check .
3️⃣ .editorconfig

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions