diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..5a82b9d4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,24 @@ +--- +name: Bug report +about: Report a verifier bug, crash, or incorrect result +labels: bug +--- + +**Description** +What went wrong? + +**Minimal reproducer** +```java +// smallest snippet that triggers the issue +``` + +**Expected behavior** +What should have happened? + +**Actual behavior** +Error message, stack trace, or counterexample output. + +**Environment** +- LiquidJava version / commit: +- Java version (`java -version`): +- OS: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..86b2d754 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,14 @@ +--- +name: Feature request +about: Suggest a new feature or improvement +labels: enhancement +--- + +**Problem** +What are you trying to do that LiquidJava doesn't support today? + +**Proposed solution** +What should it look like? Include an example annotation or API sketch if relevant. + +**Alternatives considered** +Other approaches you've thought about. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..04e8a9af --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +## Description +[Describe the changes you've made] + +## Example +[Add a code example of the change, especially if it is a new feature] + +## Related Issue +[Reference any related issue] + +## Type of change +- [ ] Bug fix +- [ ] New feature +- [ ] Documentation update +- [ ] Code refactoring + +## Checklist +- [ ] Added/updated tests under `liquidjava-example/src/main/java/testSuite/` (`Correct*` / `Error*`) +- [ ] `mvn test` passes locally +- [ ] Updated docs/README if behavior or API changed diff --git a/CLAUDE.md b/CLAUDE.md index 156c04b3..ec5b7aa2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -62,9 +62,7 @@ Tests are discovered by `TestExamples#testPath` (parameterized) under `liquidjav - Single-file cases: filename starts with `Correct…` or `Error…`. - Directory cases: directory name contains the substring `correct` or `error`. - Anything else is **ignored** (so helper sources can live alongside). -- Expected error for a failing case: - - Single file: write the expected error title in a comment on the **first line** of the file. - - Directory: place a `.expected` file in that directory containing the expected error title. +- Expected errors for a failing case are declared with inline `// ` comments on **the line where each error should be reported** (regex `//\s*(.*?\bError\b)`, case-insensitive — see `TestUtils#getExpectedErrorsFromFile`). Both the title and the line number must match, and the count of comments must equal the count of reported errors. Directory cases work the same way: the scanner walks every file in the directory; there are no `.expected` files. When adding new test cases, place them under `liquidjava-example/src/main/java/testSuite/` following the naming rules above — that is the only way they get picked up. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..b819020d --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,21 @@ +# Code of Conduct + +We are committed to a friendly, safe, and welcoming environment for everyone. + +## Expected behavior + +- Be respectful and considerate. +- Assume good intent; give constructive feedback. +- Welcome newcomers and differing viewpoints. + +## Unacceptable behavior + +Harassment, discrimination, personal attacks, or any conduct that makes others feel unsafe. + +## Reporting + +Report concerns to **coolkidsfcul@gmail.com**. Reports are handled confidentially. + +Maintainers may warn, edit, or remove contributions and contributors that violate this Code of Conduct. + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..7d35dafd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,60 @@ +# Contributing to LiquidJava + +Thanks for your interest in contributing! This guide covers the essentials. + +## Requirements + +- Java 20+ +- Maven 3.6+ + +## Build & test + +```bash +mvn clean install # build everything +mvn test # run the test suite +``` + +Run a single test: + +```bash +mvn -pl liquidjava-verifier -Dtest=TestExamples#testMultiplePaths test +``` + +Verify a single file from the CLI: + +```bash +./liquidjava path/to/File.java +``` + +Code formatting runs automatically via `formatter-maven-plugin` during the `validate` phase. + +## Adding test cases + +Tests live under `liquidjava-example/src/main/java/testSuite/` and are auto-discovered: + +- **Single file:** name it `Correct*.java` (should pass) or `Error*.java` (should fail). +- **Directory:** include `correct` or `error` in the directory name. + +For failing cases (file or directory), mark each expected error with an inline `// ` comment on the same line where the error should be reported, e.g.: + +```java +int r = pos; // Refinement Error +``` + +The runner matches both the title and the line number, and the number of comments must equal the number of reported errors. + + +## Pull requests + +1. Fork and create a branch from `main`. +2. Add tests for your change. +3. Run `mvn test` and make sure it passes. +4. Open a PR describing the change and linking any related issue. + +## Reporting issues + +Use the issue templates. Include a minimal reproducer when possible. + +## Code of Conduct + +By participating you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..fce9907e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 LiquidJava contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.