Skip to content

Commit

Permalink
Merge pull request #22 from Berkeley-CS61B/deprecate-fix-dy
Browse files Browse the repository at this point in the history
update intellij version
  • Loading branch information
davidmyang authored Jan 21, 2025
2 parents 53a196f + 626f9b5 commit 4a5957d
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 19 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ jobs:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v3
uses: actions/checkout@v4

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4
uses: gradle/wrapper-validation-action@v3

# Setup Java 11 environment for the next steps
# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
java-version: 17

# Set environment variables
- name: Export Properties
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests
Expand All @@ -97,7 +97,7 @@ jobs:
# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
Expand All @@ -111,7 +111,7 @@ jobs:
# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier
Expand All @@ -129,7 +129,7 @@ jobs:
# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
Expand All @@ -147,7 +147,7 @@ jobs:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v3
uses: actions/checkout@v4

# Remove old release drafts by using the curl request for the available releases with draft flag
- name: Remove Old Release Drafts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
with:
ref: ${{ github.event.release.tag_name }}

# Setup Java 11 environment for the next steps
# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
java-version: 17

# Set environment variables
- name: Export Properties
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
// Java support
id("java")
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.8.0"
id("org.jetbrains.intellij") version "1.17.3"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "1.3.1"
// Gradle Qodana Plugin
Expand Down
15 changes: 11 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,29 @@
pluginGroup = edu.berkeley.cs61b.plugin
pluginName = CS 61B
# SemVer format -> https://semver.org
pluginVersion = 2.0.15
pluginVersion = 2.0.16

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 213
pluginSinceBuild = 233
pluginUntilBuild = 242.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension
platformType = IC
platformVersion = 2022.2.1
platformVersion = 2023.3.8

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins = com.intellij.java

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 7.5.1
gradleVersion = 8.10.2

# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
# suppress inspection "UnusedProperty"
kotlin.stdlib.default.dependency = false

# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.configuration-cache = true

# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching = true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
250 changes: 250 additions & 0 deletions src/main/resources/style_config/cs61b_sp25_checks.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration for CS61B. Modified from sun_checks.xml, which checks the
sun coding conventions from:
- the Java Language Specification at
http://java.sun.com/docs/books/jls/second_edition/html/index.html
- the Sun Code Conventions at http://java.sun.com/docs/codeconv/
- the Javadoc guidelines at
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
- the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
- some best practices
For information on configuration, see http://checkstyle.sf.net.
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
Finally, it is worth reading the documentation.
-->

<module name="Checker">

<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf_cr_crlf"/>
</module>

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="FileLength">
<property name="max" value="2000"/>
</module>

<module name="LineLength">
<property name="max" value="120"/>
</module>

<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<!-- note from Eli: I hate this rule. Tabs >> Spaces -->
<module name="FileTabCharacter"/>
<!-- this is to prevent the style checker from throwing an absurd amount of errors if you have tabs-->
<property name="tabWidth" value="4"/>
<!-- Note from Ethan: ??? -->

<module name="TreeWalker">
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName">
<property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/>
<message key="name.invalidPattern" value="Constant ''{0}'' must be in ALL_CAPS." />
</module>
<module name="LocalFinalVariableName">
<property name="format" value="^([A-Z][0-9]*|[a-z][a-zA-Z0-9]*)$"/>
<message key="name.invalidPattern" value="Local final variable ''{0}'' must be in camelCase, or consist of a single upper-case letter." />
</module>
<module name="LocalVariableName">
<property name="format" value="^([A-Z][0-9]*|[a-z][a-zA-Z0-9]*)$"/>
<message key="name.invalidPattern" value="Local variable ''{0}'' must be in camelCase, or consist of a single upper-case letter." />
</module>
<module name="MemberName">
<property name="format" value="^_?[a-z][a-zA-Z0-9]*$|_?[A-Z]$"/>
<message key="name.invalidPattern" value="Instance variable ''{0}'' must be in camelCase, and may start with an underscore."/>
</module>
<module name="MethodName">
<property name="format" value="^([A-Z][0-9]*|[a-z][a-zA-Z0-9]*)$"/>
<message key="name.invalidPattern" value="Method name ''{0}'' must be in camelCase, or consist of a single upper-case letter." />
</module>
<module name="PackageName">
<property name="format" value="^[a-z][a-z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)*$" />
<message key="name.invalidPattern" value="Package name ''{0}'' must start with a lower-case letter."/>
</module>
<module name="ParameterName">
<property name="format" value="^([A-Z][0-9]*|[a-z][a-zA-Z0-9]*)$"/>
<message key="name.invalidPattern" value="Parameter ''{0}'' must be in camelCase, or consist of a single upper-case letter." />
</module>
<module name="StaticVariableName">
<property name="format" value="^_?[a-z][a-zA-Z0-9]*$|_?[A-Z]$"/>
<message key="name.invalidPattern" value="Static variable ''{0}'' must be in camelCase, or consist of a single upper-case letter, and may start with an underscore." />
</module>
<module name="TypeName">
<property name="format" value="^[A-Z][A-Za-z0-9]*$"/>
<message key="name.invalidPattern" value="Type (class) name ''{0}'' must start with a capital letter."/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z][A-Za-z0-9]*$"/>
<message key="name.invalidPattern" value="Type parameter ''{0}'' must start with a capital letter."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="^[A-Z][A-Za-z0-9]*$"/>
<message key="name.invalidPattern" value="Type parameter ''{0}'' must start with a capital letter."/>
</module>

<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<!-- Don't check star imports because IntelliJ does this automatically -->
<module name="RedundantImport"/>
<module name="UnusedImports"/>

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="MethodLength">
<property name="max" value="80"/>
</module>
<module name="ParameterNumber">
<property name="max" value="8"/>
</module>
<module name="OuterTypeNumber">
<property name="max" value="1"/>
</module>

<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<!-- Check whitespace either side of <, > in generics -->
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter">
<!-- The check processes ARRAY_DECLARATOR and INDEX_OP tokens specially
from other tokens. Actually it is checked that there is no whitespace
before these tokens, not after them. Space after the ANNOTATIONS before
ARRAY_DECLARATOR and INDEX_OP will be ignored. -->
<property name="tokens" value="AT"/>
<property name="tokens" value="INC"/>
<property name="tokens" value="DEC"/>
<property name="tokens" value="UNARY_MINUS"/>
<property name="tokens" value="UNARY_PLUS"/>
<property name="tokens" value="BNOT"/>
<property name="tokens" value="LNOT"/>
<property name="tokens" value="DOT"/>
<property name="tokens" value="METHOD_REF"/>
<property name="tokens" value="ARRAY_INIT"/>
<property name="tokens" value="ARRAY_DECLARATOR"/>
<property name="tokens" value="INDEX_OP"/>
<!-- Missing: TYPECAST, LITERAL_SNYCHRONIZED -->
</module>
<module name="NoWhitespaceBefore">
<property name="tokens" value="COMMA"/>
<property name="tokens" value="SEMI"/>
<property name="tokens" value="POST_INC"/>
<property name="tokens" value="POST_DEC"/>
<property name="tokens" value="GENERIC_START"/>
<property name="tokens" value="GENERIC_END"/>
<property name="tokens" value="ELLIPSIS"/>
<property name="tokens" value="LABELED_STAT"/>
<property name="tokens" value="METHOD_REF"/>
</module>
<module name="NoWhitespaceBefore">
<property name="allowLineBreaks" value="true"/>
<property name="tokens" value="DOT"/>
</module>
<module name="NoWhitespaceBeforeCaseDefaultColon"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>

<!-- Whitespace checks related to linebreaks -->
<module name="OperatorWrap"/>
<module name="SeparatorWrap"/>

<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifier.html -->
<module name="ModifierOrder"/>
<!-- <module name="RedundantModifier"/> --> <!-- Affects inner constructor weirdly -->

<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<module name="EmptyBlock">
<property name="option" value="statement"/>
<property name="tokens" value="LITERAL_DO"/>
<property name="tokens" value="LITERAL_ELSE"/>
<property name="tokens" value="LITERAL_FINALLY"/>
<property name="tokens" value="LITERAL_IF"/>
<property name="tokens" value="LITERAL_FOR"/>
<property name="tokens" value="LITERAL_TRY"/>
<property name="tokens" value="INSTANCE_INIT"/>
<property name="tokens" value="STATIC_INIT"/>
<property name="tokens" value="LITERAL_SWITCH"/>
</module>
<module name="EmptyBlock">
<property name="option" value="text"/>
<property name="tokens" value="LITERAL_CATCH,LITERAL_WHILE"/>
</module>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>

<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="EmptyStatement"/>
<module name="FallThrough"/>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
</module>
<module name="IllegalCatch">
<property name="illegalClassNames" value="java.lang.Exception, java.lang.Throwable,
java.lang.Error"/>
</module>
<module name="InnerAssignment"/>
<module name="MagicNumber">
<property name="ignoreNumbers" value="-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0.25, 0.5"/>
</module>
<module name="MissingSwitchDefault"/>
<module name="ModifiedControlVariable">
<property name="skipEnhancedForLoopVariable" value="true"/>
</module>
<module name="OneStatementPerLine"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>

<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<module name="InterfaceIsType"/>
<module name="OneTopLevelClass"/>
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true"/>
<property name="packageAllowed" value="true"/>
<message key="variable.notPrivate" value="Class member (field) ''{0}'' may not be public."/>
</module>

<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="ArrayTypeStyle"/>
<module name="CommentsIndentation"/>
<module name="Indentation"/>
<module name="NoCodeInFile"/>
<module name="TodoComment">
<property name="format" value="(?i:((TODO)|(FIXME)))"/>
<message key="todo.match" value="Found a TODO or FIXME comment"/>
</module>
<module name="UpperEll"/>

</module>

</module>

0 comments on commit 4a5957d

Please sign in to comment.