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

Adding linter #163

Draft
wants to merge 20 commits into
base: v3_FileInfoImprovementAndRequestHandler
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
4 changes: 4 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: CI Build

env:
CIBUILD: true

on:
workflow_dispatch:
pull_request:
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# ids.server: Server part of ICAT Data Server (IDS)

## Linting
The [spotless-maven-plugin](https://mvnrepository.com/artifact/com.diffplug.spotless/spotless-maven-plugin) is used here for linting. It uses the Eclipse code formatting feature. The guidelines are defined in `eclipse-formatter.xml` which was initially exported from eclipse (so you can do it again: define rules in eclipse an export the file to use it here).

An automatically code formatting is triggered while local build. In CI builds the code is only validated.
You also can execute the commands manually:
* `mvn spotless:check` for validation
* `mvn spotless:apply` to update the source code like it is defined in the formatters configuration.

### Import order
The import order is also validated and applied by the spotless-maven-plugin. It is defined in the file `eclipse-importorder.txt` and referenced in `pom.xml`. It is needed that it has a compatible format like the eclipse built-in import order configuration (better its exported file).

## Further Information
[![Build Status](https://github.com/icatproject/ids.server/workflows/CI%20Build/badge.svg?branch=master)](https://github.com/icatproject/ids.server/actions?query=workflow%3A%22CI+Build%22)

General installation instructions are at http://www.icatproject.org/installation/component
Expand Down
Loading
Loading