Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .junie/guidelines/formatting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Code Formatting Guidelines

- All code formatting must strictly adhere to the IntelliJ IDEA project settings defined in `.idea/codeStyles/Project.xml`.
- Read and follow the specific rules configured in that file for all supported languages (Java, JavaScript, TypeScript, CSS, Python, etc.).
17 changes: 17 additions & 0 deletions .junie/guidelines/java.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Java Coding Guidelines

#### General
- Prefer `Stream` API over traditional for-loops for collection processing.
- Whenever possible, use try-with-resources for automatic resource management.
- Always ask before adding, removing, or updating a third-party library dependency.
- Always use org.jetbrains.annotations.NotNull and org.jetbrains.annotations.Nullable for nullability annotations.
- Be explicit about nullability in public API method signatures.

#### Logging
- Use Log4J2 for logging.
- Name the static logger `LOG` and initialize it using `org.labkey.api.util.logging.LogHelper.getLogger()`.

#### Testing
- For unit tests, create a static `TestCase` inner class extending `Assert` in the same file as production code.
- Add new `TestCase` classes to the owning module's list in `getUnitTests()`
- Use JUnit 4 annotations (e.g., @Test) for these inner test classes.