Skip to content

Commit

Permalink
Add CI, use Gradle 8.7 (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored May 9, 2024
1 parent a24b8c8 commit 95d8a6a
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 23 deletions.
10 changes: 0 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,3 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: com.google.errorprone:javac
versions:
- 1.8.0-u20
- dependency-name: org.checkerframework:framework-test
versions:
- 3.10.0
- dependency-name: org.checkerframework:checker
versions:
- 3.10.0
25 changes: 25 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Java CI with Gradle

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
java: [ '11', '17', '21' ]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
show-progress: false
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: ./gradlew build javadoc
run: ./gradlew build
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template for a checker built on the Checker Framework

This is a template for a pluggable type-checker built on the Checker Framework.
This repository contains a template for a pluggable type-checker built on the Checker Framework.

### How to use this template to build your own typechecker

Expand Down Expand Up @@ -71,6 +71,14 @@ LC_ALL=C find . -type f -exec sed -i -e 's:org/checkerframework/checker/template
7. Remove all text from the top of this `README.md` file, through this line.


# The remainder of this README

The remainder of this README is the user-facing documentation for the analysis
you will build.

You should remove, from your version, everything above and including this line.


# TemplateForA Checker

A common problem when programming is TODO.
Expand Down Expand Up @@ -105,7 +113,8 @@ informing you of any potential errors related to TODO.
## How to specify your code

At compile time, the TemplateForAChecker estimates what values the program
may compute at run time. It issues a warning if the program may TODO.
may compute at run time. It issues a warning if the program may
TODO.
It works via a technique called pluggable typechecking.

You need to specify the contracts of methods and fields in your code --
Expand All @@ -115,7 +124,8 @@ contracts guarantee that TODO.

You specify your code by writing *qualifiers* such as `@TemplateforaBottom`
on types, to indicate more precisely what values the type represents.
Here are the type qualifiers that are supported by the TemplateForAChecker:
Here is a list of the type qualifiers that are supported by
the TemplateForAChecker, with an explanation of each one:

`@TemplateforaUnknown`:
The value might or might not be TODO. It is not safe to use for TODO.
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
The "qual" directory contains a typechecker's type qualifiers, which are
The `qual/` directory contains a typechecker's type qualifiers, which are
represented by Java annotations.
16 changes: 8 additions & 8 deletions tests/templatefora/SubtypingTest.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import org.checkerframework.checker.templatefora.qual.*;

// Test basic subtyping relationships for the TemplateForA Checker.
// Test subtyping relationships for the TemplateForA Checker.
class SubtypeTest {
void allSubtypingRelationships(@TemplateforaUnknown int x, @TemplateforaBottom int y) {
@TemplateforaUnknown int a = x;
@TemplateforaUnknown int b = y;
// :: error: assignment
@TemplateforaBottom int c = x; // expected error on this line
@TemplateforaBottom int d = y;
}
void allSubtypingRelationships(@TemplateforaUnknown int x, @TemplateforaBottom int y) {
@TemplateforaUnknown int a = x;
@TemplateforaUnknown int b = y;
// :: error: assignment
@TemplateforaBottom int c = x; // expected error on this line
@TemplateforaBottom int d = y;
}
}

0 comments on commit 95d8a6a

Please sign in to comment.