https://github.com/objectionary/wpa
Whole Program Analysis (WPA) linters for EO code
https://github.com/objectionary/wpa
code-analysis codeanalysis eolang java static-analysis
Last synced: 9 days ago
JSON representation
Whole Program Analysis (WPA) linters for EO code
- Host: GitHub
- URL: https://github.com/objectionary/wpa
- Owner: objectionary
- License: mit
- Created: 2026-04-24T08:32:13.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2026-06-18T06:18:57.000Z (19 days ago)
- Last Synced: 2026-06-18T08:14:53.509Z (19 days ago)
- Topics: code-analysis, codeanalysis, eolang, java, static-analysis
- Language: Java
- Homepage:
- Size: 148 KB
- Stars: 4
- Watchers: 0
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Whole-Program Analyzers for EO
[](https://www.elegantobjects.org)
[](https://www.jetbrains.com/idea/)
[](https://github.com/objectionary/wpa/actions/workflows/mvn.yml)
[](https://www.0pdd.com/p?name=objectionary/wpa)
[](https://maven-badges.herokuapp.com/maven-central/org.eolang/wpa)
[](https://www.javadoc.io/doc/org.eolang/wpa)
[](https://github.com/objectionary/wpa/blob/master/LICENSE.txt)
This Java package is a collection of whole-program analyzers
(a.k.a. WPA lints) for [XMIR] — an intermediate representation of
[EO] objects. WPA lints analyze a set of XMIR files together,
rather than one file at a time.
Single-file lints live in a separate package,
[`org.eolang:lints`](https://github.com/objectionary/lints),
which this library builds upon.
Add it to your project:
```xml
org.eolang
wpa
```
Then, run a whole-program analysis of XMIR files using the `Program`
class:
```java
import java.nio.file.Paths;
import org.eolang.lints.Program;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
final class Foo {
@Test
void testProgram() {
Assertions.assertTrue(
new Program(
Paths.get("xmir-files")
).defects().isEmpty()
);
}
}
```
You can disable any particular linter with the help of the `+unlint`
meta in your XMIR source.
## Design of This Library
The library is designed as a set of `Lint>`
implementations. The `Program` class is the public entry point —
it discovers `.xmir` files in a directory, runs all WPA lints, and
returns the collected defects.
Classes exposed to users of the library:
* `Program` — checker of a set of [XMIR]
* `Defect` — a single defect discovered (from `org.eolang:lints`)
* `Severity` — severity of a defect (from `org.eolang:lints`)
## How to Contribute
Fork the repository, make changes, and send us a pull request.
We will review your changes and apply them to the `master` branch
shortly, provided they don't violate our quality standards.
To avoid frustration, before sending us your pull request please
run a full Maven build:
```bash
mvn clean install -Pqulice
```
You will need Maven 3.8+ and Java 11+.
[XMIR]: https://news.eolang.org/2022-11-25-xmir-guide.html
[EO]: https://www.eolang.org