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
84 changes: 75 additions & 9 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,99 @@
{
"enabledPlugins": {
"rust-analyzer-lsp@claude-plugins-official": true
},
"permissions": {
"allow": [
"Agent(*)",
"Bash(./gradlew:*)",
"Bash(./x.py check:*)",
"Bash(basename:*)",
"Bash(cargo test:*)",
"Bash(cat:*)",
"Bash(claude plugins:*)",
"Bash(cmake:*)",
"Bash(date:*)",
"Bash(diff:*)",
"Bash(dirname:*)",
"Bash(echo:*)",
"Bash(env:*)",
"Bash(file:*)",
"Bash(find:*)",
"Bash(git -C /home/mernst/research/types/checker-framework-fork-mernst-branch-override-order diff master..override-order --stat)",
"Bash(git -C /home/mernst/research/types/checker-framework-fork-mernst-branch-override-order log master..override-order --oneline)",
"Bash(gh issue list:*)",
"Bash(gh issue view:*)",
"Bash(gh pr create:*)",
"Bash(gh pr list:*)",
"Bash(gh pr view:*)",
"Bash(gh repo view:*)",
"Bash(git -C * diff:*)",
"Bash(git -C * log:*)",
"Bash(git add:*)",
"Bash(git branch:*)",
"Bash(git checkout:*)",
"Bash(git commit:*)",
"Bash(git diff:*)",
"Bash(git log:*)",
"Bash(git remote -v:*)",
"Bash(git remote get-url:*)",
"Bash(git rev-parse:*)",
"Bash(git show:*)",
"Bash(git stash list:*)",
"Bash(git stash:*)",
"Bash(git status:*)",
"Bash(git switch:*)",
"Bash(git tag:*)",
"Bash(go test:*)",
"Bash(grep:*)",
"Bash(head:*)",
"Bash(java:*)",
"Bash(javac:*)",
"Bash(javap:*)",
"Bash(ls:*)",
"Bash(make:*)",
"Bash(md5sum:*)",
"Bash(mkdir:*)",
"Bash(npm ci:*)",
"Bash(npm install:*)",
"Bash(npm test:*)",
"Bash(pip install:*)",
"Bash(pip3 install:*)",
"Bash(printenv:*)",
"Bash(pwd:*)",
"Bash(pytest:*)",
"Bash(python3 -m json.tool)",
"Bash(timeout 300 ./gradlew:*)",
"Bash(python3 -m pytest:*)",
"Bash(realpath:*)",
"Bash(sha256sum:*)",
"Bash(sort:*)",
"Bash(stat:*)",
"Bash(tail:*)",
"Bash(uniq:*)",
"Bash(wc:*)",
"Bash(xargs cat:*)",
"Bash(which:*)",
"Edit(*)",
"Edit(./**)",
"Glob(*)",
"Grep(*)",
"NotebookEdit(*)",
"Read(*)",
"Read(//home/mernst/research/types/checker-framework-fork*/**)",
"Read(//scratch/**)",
"Read(//tmp/**)",
"WebFetch(domain:checkerframework.org)"
"Skill(*)",
"TaskCreate(*)",
"TaskUpdate(*)",
"WebFetch(*)",
"WebFetch(domain:checkerframework.org)",
"WebSearch(*)",
"Write(*)"
],
"deny": [],
"ask": []
},
"skipDangerousModePermissionPrompt": true
"enabledPlugins": {
"rust-analyzer-lsp@claude-plugins-official": true,
"code-review@claude-plugins-official": true
},
"skipDangerousModePermissionPrompt": true,
"spinnerVerbs": {
"mode": "replace",
"verbs": ["Thinking", "Processing", "Working"]
}
}
43 changes: 14 additions & 29 deletions .pmd-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<rule ref="category/java/bestpractices.xml/GuardLogStatement" />
<rule ref="category/java/bestpractices.xml/ImplicitFunctionalInterface" />
<rule ref="category/java/bestpractices.xml/JUnit4SuitesShouldUseSuiteAnnotation" />
<rule ref="category/java/bestpractices.xml/JUnit5TestShouldBePackagePrivate" />
<rule ref="category/java/bestpractices.xml/JUnitJupiterTestShouldBePackagePrivate" />
<rule ref="category/java/bestpractices.xml/JUnitUseExpected" />
<rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray" />
<rule ref="category/java/bestpractices.xml/MissingOverride" />
Expand Down Expand Up @@ -86,18 +86,15 @@
<rule ref="category/java/codestyle.xml/FinalParameterInAbstractMethod" />
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" />
<rule ref="category/java/codestyle.xml/LambdaCanBeMethodReference" />
<rule ref="category/java/codestyle.xml/LinguisticNaming" />
<rule ref="category/java/codestyle.xml/LocalHomeNamingConvention" />
<rule ref="category/java/codestyle.xml/LocalInterfaceSessionNamingConvention" />
<rule ref="category/java/codestyle.xml/MDBAndSessionBeanNamingConvention" />
<rule ref="category/java/codestyle.xml/ModifierOrder" />
<rule ref="category/java/codestyle.xml/NoPackage" />
<rule ref="category/java/codestyle.xml/PackageCase" />
<rule ref="category/java/codestyle.xml/PrematureDeclaration" />
<rule ref="category/java/codestyle.xml/RemoteInterfaceNamingConvention" />
<rule ref="category/java/codestyle.xml/RemoteSessionInterfaceNamingConvention" />
<rule ref="category/java/codestyle.xml/ShortClassName" />
<rule ref="category/java/codestyle.xml/TooManyStaticImports" />
<rule ref="category/java/codestyle.xml/UnnecessaryAnnotationValueElement" />
<rule ref="category/java/codestyle.xml/UnnecessaryBoxing" />
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName" />
Expand All @@ -112,11 +109,12 @@

<!-- code style rules that might be useful, but generate too much noise for now
<rule ref="category/java/codestyle.xml/CallSuperInConstructor" />
<rule ref="category/java/codestyle.xml/CommentDefaultAccessModifier" />
<rule ref="category/java/codestyle.xml/ConfusingTernary" />
<rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass" />
<rule ref="category/java/codestyle.xml/LinguisticNaming" />
<rule ref="category/java/codestyle.xml/LocalVariableCouldBeFinal" />
<rule ref="category/java/codestyle.xml/MethodArgumentCouldBeFinal" />
<rule ref="category/java/codestyle.xml/PrematureDeclaration" />
<rule ref="category/java/codestyle.xml/UselessParentheses" />
-->

<!-- code style rules that seem to be broken
Expand All @@ -127,6 +125,8 @@

<!-- code style rules we are not using
<rule ref="category/java/codestyle.xml/ClassNamingConventions" />
<rule ref="category/java/codestyle.xml/CommentDefaultAccessModifier" />
<rule ref="category/java/codestyle.xml/ConfusingTernary" />
<rule ref="category/java/codestyle.xml/FieldNamingConventions" />
<rule ref="category/java/codestyle.xml/FormalParameterNamingConventions" />
<rule ref="category/java/codestyle.xml/LocalVariableNamingConventions" />
Expand All @@ -135,12 +135,10 @@
<rule ref="category/java/codestyle.xml/OnlyOneReturn" />
<rule ref="category/java/codestyle.xml/ShortMethodName" />
<rule ref="category/java/codestyle.xml/ShortVariable" />
<rule ref="category/java/codestyle.xml/TooManyStaticImports" />
<rule ref="category/java/codestyle.xml/TypeParameterNamingConventions" />
<rule ref="category/java/codestyle.xml/UnnecessaryModifier" />
Redundant `public` can be useful.
<rule ref="category/java/codestyle.xml/UselessParentheses" />
Redundant parens can be helpful, for example to emphasize
subexpressions in string concatenation.
<rule ref="category/java/codestyle.xml/VariableCanBeInlined" />
Naming a value can improve readability.
-->
Expand Down Expand Up @@ -178,7 +176,7 @@
<rule ref="category/java/design.xml/ImmutableField" />
<rule ref="category/java/design.xml/MutableStaticState" />
-->

<!-- design rules we are not using
<rule ref="category/java/design.xml/AvoidCatchingGenericException" />
<rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts" />
Expand All @@ -195,7 +193,6 @@
<rule ref="category/java/design.xml/NcssCount" />
<rule ref="category/java/design.xml/NPathComplexity" />
<rule ref="category/java/design.xml/SimplifyBooleanReturns" />
Suggests too-clever boolean expressions to replace simpler code.
<rule ref="category/java/design.xml/TooManyMethods" />
-->

Expand All @@ -210,18 +207,11 @@

<!-- documentation rules we are not using
<rule ref="category/java/documentation.xml/CommentRequired" />
A good rule, but too disruptive to apply without lint-diff.
<rule ref="category/java/documentation.xml/CommentSize" />
<rule ref="category/java/documentation.xml/UncommentedEmptyConstructor" />
-->

<!-- error prone rules -->
<rule ref="category/java/errorprone.xml/AssignmentInOperand">
<properties>
<property name="allowIncrementDecrement" value="true" />
<!-- permit "i++" -->
</properties>
</rule>
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic" />
<rule ref="category/java/errorprone.xml/AvoidAssertAsIdentifier" />
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize" />
Expand All @@ -239,6 +229,7 @@
<rule ref="category/java/errorprone.xml/CloneMethodMustBePublic" />
<rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable" />
<rule ref="category/java/errorprone.xml/CloneMethodReturnTypeMustMatchClassName" />
<rule ref="category/java/errorprone.xml/CloseResource" />
<rule ref="category/java/errorprone.xml/CollectionTypeMismatch" />
<rule ref="category/java/errorprone.xml/ComparisonWithNaN" />
<rule ref="category/java/errorprone.xml/ConfusingArgumentToVarargsMethod" />
Expand Down Expand Up @@ -276,7 +267,6 @@
<rule ref="category/java/errorprone.xml/NonSerializableClass" />
<rule ref="category/java/errorprone.xml/NonStaticInitializer" />
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode" />
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashCodeOnComparable" />
<rule ref="category/java/errorprone.xml/ProperCloneImplementation" />
<rule ref="category/java/errorprone.xml/ProperLogger" />
<rule ref="category/java/errorprone.xml/ReplaceJavaUtilCalendar" />
Expand Down Expand Up @@ -304,11 +294,10 @@
False positive in OptionsDoclet.
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop" />
Triggers for `return` as well as for branches within the method.
<rule ref="category/java/errorprone.xml/CloseResource" />
CloseResource ought to warn only when the RHS is "new ..."
-->

<!-- error prone rules we are not using
<rule ref="category/java/errorprone.xml/AssignmentInOperand" />
<rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration" />
<rule ref="category/java/errorprone.xml/AvoidCatchingThrowable" />
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals" />
Expand All @@ -317,6 +306,7 @@
<rule ref="category/java/errorprone.xml/CompareObjectsWithEquals" />
<rule ref="category/java/errorprone.xml/DoNotTerminateVM" />
<rule ref="category/java/errorprone.xml/NullAssignment" />
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashCodeOnComparable" />
<rule ref="category/java/errorprone.xml/ReturnEmptyCollectionRatherThanNull" />
<rule ref="category/java/errorprone.xml/TestClassWithoutTestCases" />
<rule ref="category/java/errorprone.xml/UseProperClassLoader" />
Expand Down Expand Up @@ -352,27 +342,22 @@
<rule ref="category/java/performance.xml/OptimizableToArrayCall" />
<rule ref="category/java/performance.xml/StringInstantiation" />
<rule ref="category/java/performance.xml/StringToString" />
<rule ref="category/java/performance.xml/TooFewBranchesForSwitch" />
<rule ref="category/java/performance.xml/UseArrayListInsteadOfVector" />
<rule ref="category/java/performance.xml/UseArraysAsList" />
<rule ref="category/java/performance.xml/UseIndexOfChar" />
<rule ref="category/java/performance.xml/UseIOStreamsWithApacheCommonsFileItem" />
<rule ref="category/java/performance.xml/UselessStringValueOf" />
<rule ref="category/java/performance.xml/UseStringBufferLength" />

<!-- performance rules we are not using
<rule ref="category/java/performance.xml/AvoidInstantiatingObjectsInLoops" />
Blanket prohibition on `new` in loops is too broad.
<rule ref="category/java/performance.xml/ConsecutiveAppendsShouldReuse" />
It's not clear this helps, and "fluent" appends are harder to read.
<rule ref="category/java/performance.xml/RedundantFieldInitializer" /> Explicit initializers are better style
<rule ref="category/java/performance.xml/RedundantFieldInitializer" />
<rule ref="category/java/performance.xml/TooFewBranchesForSwitch" />
<rule ref="category/java/performance.xml/UseStringBufferForStringAppends" />
-->

<!-- performance rules that are broken
<rule ref="category/java/performance.xml/UseArraysAsList" />
Warns when appending to an existing list; should only warn when adding to a new empty list.
-->

<!-- security rules -->
<rule ref="category/java/security.xml/HardCodedCryptoKey" />
<rule ref="category/java/security.xml/InsecureCryptoIv" />
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Code style; defines `style-check` and `style-fix`.
ifeq (,$(wildcard .plume-scripts))
dummy := $(shell git clone --depth=1 -q https://github.com/plume-lib/plume-scripts.git .plume-scripts)
PLUME_SCRIPTS ?= .plume-scripts
ifeq (,$(wildcard ${PLUME_SCRIPTS}))
dummy := $(shell git clone --depth=1 -q https://github.com/plume-lib/plume-scripts.git ${PLUME_SCRIPTS})
endif
include .plume-scripts/code-style.mak
include ${PLUME_SCRIPTS}/code-style.mak