Skip to content

Commit 34d38c0

Browse files
authored
Merge pull request #121 from datasharingframework/linter-tool-documentation
-added dsf linter tool documentation to both api 1 and api 2
2 parents 30782e7 + 51f7422 commit 34d38c0

File tree

10 files changed

+1873
-488
lines changed

10 files changed

+1873
-488
lines changed

docs/src/.vuepress/theme.ts

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ export default hopeTheme({
156156
children: ["get-started", {
157157
text: "Concepts",
158158
icon: "info",
159-
link: "concept",
160159
collapsible: true,
161160
children: [
162161
{
@@ -225,14 +224,7 @@ export default hopeTheme({
225224
],
226225
},
227226
],
228-
}, "create", "publishing/publish-on-dsfhub", "tutorials/", "javadoc", {
229-
text: "Process Plugin Dev Tools",
230-
icon: "info",
231-
prefix: "tooling",
232-
collapsible: true,
233-
children: [
234-
"validator"],
235-
},]
227+
}, "create", "publishing/publish-on-dsfhub", "tutorials/", "javadoc", ]
236228
},
237229
{
238230
text: "API v2",
@@ -242,7 +234,6 @@ export default hopeTheme({
242234
children: ["get-started", {
243235
text: "Concepts",
244236
icon: "info",
245-
link: "concept",
246237
collapsible: true,
247238
children: [
248239
{
@@ -311,15 +302,16 @@ export default hopeTheme({
311302
],
312303
},
313304
],
314-
}, "implementation", "migration", "create", "best-practices", "testing", "publishing/publish-on-dsfhub", "tutorials/", "javadoc", {
315-
text: "Process Plugin Dev Tools",
316-
icon: "info",
317-
prefix: "tooling",
318-
collapsible: true,
319-
children: [
320-
"validator"],
321-
},]
305+
}, "implementation", "migration", "create", "best-practices", "testing", "publishing/publish-on-dsfhub", "tutorials/", "javadoc",]
322306
},
307+
{
308+
text: "Process Plugin Dev Tools",
309+
icon: "info",
310+
prefix: "linter-tool/",
311+
children: [
312+
"linter-tool",
313+
"validation","phases", "development", "troubleshooting"],
314+
}
323315
],
324316
"/dsf-development": [
325317
{

docs/src/process-development/api-v1/tooling/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ icon: operate
44
---
55

66
## Process Plugin Dev Tools
7-
- [ DSF Process Plugin Validator](validator.md)

docs/src/process-development/api-v1/tooling/validator.md

Lines changed: 0 additions & 234 deletions
This file was deleted.

docs/src/process-development/api-v2/tooling/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ icon: operate
44
---
55

66
## Process Plugin Dev Tools
7-
- [ DSF Process Plugin Validator](validator.md)

docs/src/process-development/api-v2/tooling/validator.md

Lines changed: 0 additions & 234 deletions
This file was deleted.
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
title: Development
3+
icon: code
4+
---
5+
## Development
6+
7+
### Requirements
8+
9+
- **Java**: 17 or higher
10+
- **Maven**: 3.6 or higher
11+
- **IDE**: IntelliJ IDEA, Eclipse, or VS Code (optional)
12+
13+
### IDE Setup
14+
15+
1. **Import Project**:
16+
- Import as Maven project
17+
- Set JDK to 17 or higher
18+
- Ensure Maven dependencies are resolved
19+
20+
2. **Code Style** (optional):
21+
- Configure code formatter
22+
- Set up import organization
23+
- Configure line endings
24+
25+
3. **Run Configuration**:
26+
- Create run configuration for `Main.java`
27+
- Set program arguments: `--path <jar-file> --html --verbose`
28+
- Configure working directory
29+
30+
### Building
31+
32+
```bash
33+
# Full build with tests
34+
mvn clean package
35+
36+
# Skip tests for faster iteration
37+
mvn clean package -DskipTests
38+
39+
# Verbose Maven output
40+
mvn clean package -X
41+
42+
# Build only specific module
43+
mvn clean package -pl linter-core
44+
45+
# Install to local Maven repository
46+
mvn clean install
47+
```
48+
49+
### Testing
50+
51+
```bash
52+
# Run all tests
53+
mvn test
54+
55+
# Run specific test class
56+
mvn test -Dtest=BpmnLoadingTest
57+
58+
# Run specific test method
59+
mvn test -Dtest=BpmnLoadingTest#testLoadBpmn
60+
61+
# Run tests with verbose output
62+
mvn test -X
63+
64+
# Skip tests during build
65+
mvn clean package -DskipTests
66+
67+
# Run tests with coverage (if configured)
68+
mvn test jacoco:report
69+
```
70+
71+
### Development Workflow
72+
73+
```bash
74+
# 1. Make changes to source code
75+
vim linter-core/src/main/java/dev/dsf/linter/service/BpmnLintingService.java
76+
77+
# 2. Build the project
78+
mvn clean package -DskipTests
79+
80+
# 3. Test with a sample plugin
81+
java -jar linter-cli/target/linter-cli-1.0-SNAPSHOT.jar \
82+
--path test-plugin.jar --html --verbose
83+
84+
# 4. Check the generated report
85+
open /tmp/dsf-linter-report-test-plugin/dsf-linter-report/index.html
86+
87+
# 5. Run unit tests
88+
mvn test
89+
90+
# 6. Commit changes
91+
git add .
92+
git commit -m "Description of changes"
93+
```
94+
95+
### Debugging
96+
97+
#### Remote Debugging
98+
99+
```bash
100+
# Start the linter with debugger enabled
101+
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 \
102+
-jar linter-cli/target/linter-cli-1.0-SNAPSHOT.jar \
103+
--path plugin.jar --html --verbose
104+
105+
# Attach debugger from IDE to localhost:5005
106+
```
107+
108+
#### Logging
109+
110+
The linter uses Logback for logging. Configuration files:
111+
112+
- `logback.xml`: Standard logging (INFO level)
113+
- `logback-verbose.xml`: Verbose logging (DEBUG level, activated with `--verbose`)
114+
115+
Log levels:
116+
- **ERROR**: Fatal errors and exceptions
117+
- **WARN**: Warnings and non-fatal issues
118+
- **INFO**: General information and progress
119+
- **DEBUG**: Detailed debugging information (verbose mode only)
120+
121+
#### Common Debugging Scenarios
122+
123+
1. **Plugin Not Found**:
124+
- Enable verbose logging
125+
- Check ServiceLoader registration
126+
- Verify classpath
127+
128+
2. **Resource Not Found**:
129+
- Check JAR structure
130+
- Verify resource paths
131+
- Enable verbose logging
132+
133+
3. **Class Loading Issues**:
134+
- Check classloader setup
135+
- Verify dependencies
136+
- Check API version compatibility
137+
138+
### Code Style Guidelines
139+
140+
- Follow Java naming conventions
141+
- Use meaningful variable and method names
142+
- Add JavaDoc comments for public APIs
143+
- Keep methods focused and small
144+
- Use immutable objects where possible
145+
- Handle exceptions appropriately
146+
- Write unit tests for new features

0 commit comments

Comments
 (0)