Skip to content

Commit

Permalink
refactor(style): switch from fmt to spotless to apply code style (#4582)
Browse files Browse the repository at this point in the history
Co-authored-by: Houssain Barouni <146710021+houssain-barouni@users.noreply.github.com>
Co-authored-by: Houssain Barouni <houssain.barouni@camunda.com>
  • Loading branch information
3 people committed Mar 11, 2024
1 parent 81dc4e4 commit 5460e43
Show file tree
Hide file tree
Showing 48 changed files with 1,276 additions and 1,123 deletions.
15 changes: 13 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

name: Bug report
about: Report a problem and help us fix it.
title: ''
Expand All @@ -8,9 +9,11 @@ assignees: ''
---

### Describe the bug

<!-- A clear and concise description of what the problem/bug is about and what is the current behavior. -->

### To Reproduce
### To Reproduce

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
Expand All @@ -20,29 +23,35 @@ Steps to reproduce the behavior:
<!-- Please attach screenshots, a screen recording, or a file (e.g. the BPMN/DMN/Form file) that has the problem you are describing to help us better debug the respective issue. -->

### Actual behavior

<!-- A clear and concise description of what is currently happening. -->

### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

### Environment

<!-- Please provide details about the environment you were in when the problem occurred. -->
- OS: [e.g. MacOS]
- Browser: [e.g. chrome, safari]
- Tasklist Version: [e.g. 8.1]

### Additional context

<!-- Please add any other context about the problem. Here you can also provide us some data that you used while the bug happen like **json** file or specific **BPMN**. -->

---------------------------------------------------------------------------------------------

<!-- As the creator of the issue, you don't have to fill anything below this line, but the assignee will take care of this as part of Backlog grooming. -->

### Acceptance Criteria

<!-- the assignee will fill the Acceptance Criteria. -->

### Definition of Ready - Checklist
<!-- the assignee will check the DOR. -->

<!-- the assignee will check the DOR. -->
- [ ] The bug has been reproduced by the assignee in the environment compatible with the provided one; otherwise, the issue is closed with a comment
- [ ] The issue has a meaningful title, description, and testable acceptance criteria
- [ ] Necessary screenshots, screen recordings, or files are attached to the bug report
Expand All @@ -52,5 +61,7 @@ For UI changes required to solve the bug:
- [ ] Design input has been collected by the assignee

### After solving the issue - Answer and document in the comments the questions below

- [ ] What was the root cause for this bug?
- [ ] Is there anything we should do for the error to not happen anymore?

12 changes: 11 additions & 1 deletion .github/ISSUE_TEMPLATE/epic.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

name: PDP Epic
about: Summary of tasks/features to implement PDP epic.
title: 🎯
Expand All @@ -8,18 +9,25 @@ assignees: ''
---

### Description

<!-- Please, describe the epic to be worked at or add link to PDP item -->
<!-- - [ ] <PDP item link> -->
<!-- - [ ] <Design issue> -->

### TODO

<!-- Add links to all related frontend and backend issues here -->

#### Backend

<!-- * [ ] #<issue-number> -->

#### Frontend

<!-- * [ ] #<issue-number> -->

### Additional Information

<!-- Dependency, affected components, targeted release -->

### Definition of Ready - Checklist
Expand All @@ -28,5 +36,7 @@ assignees: ''
- [ ] Edge cases and limitations are clear

### Acceptance Criteria

<!-- The assignee can add additional Acceptance Criteria -->
- [ ] All the TODO issues are done
- [ ] All the TODO issues are done

10 changes: 9 additions & 1 deletion .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
---

name: Feature
about: This is a template to write a new feature or story related to the Epic
title: ''
labels: kind/feature
assignees: ''

---

<!-- Remember to link this feature issue in the parent Epic -->

### Description

<!-- [Optional] A clear description of the story -->

### User Story

<!-- [Mandatory field] -->

```Gherkin
Scenario: As an Tasklist user
Given I am logged in
When I select one item/tab in the toolbar
Then this item should be shown in highlighted (in bold)
```

### Designs

<!-- [Optional] <Zeplin Link> -->

### Acceptance Criteria

<!-- [Mandatory field] The assignee will fill the Acceptance Criteria. -->
- [ ]

### Definition of Ready - Checklist
<!-- the assignee will check the DOR. -->

<!-- the assignee will check the DOR. -->
- [ ] The issue has a meaningful title, description, and testable acceptance criteria

Optional:
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---

name: Feature request
about: Suggest an idea for this project
title: ''
labels: kind/feature-request
assignees: ''

---

### Describe the user problem that you are trying to solve

<!-- A clear and concise description of what the problem is, what are you trying to achieve and why is it difficult at the moment?-->
Expand All @@ -23,9 +25,11 @@ assignees: ''
<!-- Add any other context, feature requests from customers, forum / slack mentions. -->

---------------------------------------------------------------------------------------------

<!-- As the creator of the issue, you don't have to fill anything below this line, but the assignee will take care of this as part of Backlog grooming. -->

## Definition of Ready - Checklist

- [ ] The issue is not duplicated - the is no other issue about the same user problem in Operate/Tasklist/PDP repository
- [ ] The issue has a meaningful title, description and clear user problem

12 changes: 11 additions & 1 deletion .github/ISSUE_TEMPLATE/general-task.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
---

name: Task
about: Describe a task for the technical issue - it may be individual issue or be connected to epic.
title: ''
labels: kind/task
assignees: ''

---

<!-- This type is for the technical issues - it may be individual issue or be connected to epic.-->

### Description

<!-- Please, describe the task to be worked at -->

### TODO

<!-- [Optional] add the TODOs in here -->

### Additional Information

<!-- [Optional] add the TODOs in here
e.g. where the task is coming from (Stackdriver errors, Slack question etc.)
Dependency, affected components, priority -->

---------------------------------------------------------------------------------------------

<!-- As the creator of the issue, you don't have to fill anything below this line, but the assignee will take care of this as part of Backlog grooming. -->

### Acceptance Criteria

<!-- [Mandatory field] The assignee will fill the Acceptance Criteria. -->
- [ ] Checked if the specific data needs to be provided for the QA process

### Definition of Ready - Checklist

<!-- the assignee will check the DOR. -->
- [ ] The issue has a meaningful title, description and testable acceptance criteria
- [ ] The issue has a meaningful title, description and testable acceptance criteria

4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/spike-research.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

name: Spike/Research
about: Research about a possible solution/change
title: ''
Expand All @@ -8,13 +9,16 @@ assignees: ''
---

### What do we want to solve?

<!-- Describe here the challenge you want to solve. -->

### Expected outcome

<!-- What is the expected outcome of this spike?
- Should we have a list of stories to work on?
- Should we create documentation out of it?
Please, describe the outcomes from the spike and create tasks/features issue that will be linked in the comment below. -->

### Timebox

<!-- How much time are we willing to spend into this spike? -->
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Documentation:
## Definition of Reviewed

<!-- As a reviewer please check the items that apply before approving this PR -->

- [ ] All acceptance criteria described in the issue are met
- [ ] Unit/integration tests are written, that verify all acceptance criteria of the issue
- [ ] E2E tests are written, if the acceptance criteria can't be covered in unit/integration tests
- [ ] The fix/feature is tested manually by the reviewer

4 changes: 2 additions & 2 deletions .github/workflows/backend-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
java-version: '17'
- run: mvn -q checkstyle:check
name: Check style
- run: mvn -q com.coveo:fmt-maven-plugin:check
name: Check formatting
- run: mvn -q license:check -Dlicense.header=license/license-header
name: Check license header
- run: mvn -q spotless:check
name: Check Google Java codestyle
2 changes: 1 addition & 1 deletion .github/workflows/ci-build-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
# Build: maven artifacts and Docker images
- name: Build Maven
run: |
mvn com.coveo:fmt-maven-plugin:check -T1C clean deploy -P -docker -DskipTests=true -DaltStagingDirectory=${{ github.workspace }}/staging-${{ env.BRANCH_NAME }} -DskipRemoteStaging=true -Dmaven.deploy.skip=true
mvn spotless:check -T1C clean deploy -P -docker -DskipTests=true -DaltStagingDirectory=${{ github.workspace }}/staging-${{ env.BRANCH_NAME }} -DskipRemoteStaging=true -Dmaven.deploy.skip=true
#########################################################################
# Docker login and image tagging
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
hs_err_pid*

*.iml
.idea/
.idea/*
!.idea/codeStyles
!.idea/externalDependencies.xml
!.idea/google-java-format.xml
!.idea/saveactions_settings.xml
.classpath
.project
.settings
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ $? -eq 1 ]; then
echo "Found errors in checkstyle."
exit 1
fi
mvn com.coveo:fmt-maven-plugin:check
mvn spotless:check
if [ $? -eq 1 ]; then
echo "Found errors in formatting. Reformat ..."
mvn com.coveo:fmt-maven-plugin:format
Expand Down

0 comments on commit 5460e43

Please sign in to comment.