Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0cab126
Add Command Pattern to create an interactive menu system in Main.java
bcExpt1123 Jun 25, 2025
9534874
Update test results
bcExpt1123 Jun 25, 2025
7ac7f51
📝 Add docstrings to `test`
coderabbitai[bot] Jun 25, 2025
8b1569c
Merge pull request #4 from bcExpt1123/coderabbitai/docstrings/9534874
bcExpt1123 Jun 25, 2025
38b6103
Add AVL tests
bcExpt1123 Jun 26, 2025
a000fdd
Merge conflicts
bcExpt1123 Jun 26, 2025
ce41903
Add Style checker
bcExpt1123 Jun 26, 2025
bc46e24
Create summarize_new_issue.yaml
bcExpt1123 Jun 26, 2025
b112a6b
Create label_pr.yaml
bcExpt1123 Jun 26, 2025
00b8e62
Create maven.yaml
bcExpt1123 Jun 26, 2025
d4386b7
Create pmd.yaml
bcExpt1123 Jun 26, 2025
6cd75ef
Create codeql
bcExpt1123 Jun 26, 2025
3f456f5
Rename codeql to codeql.yaml
bcExpt1123 Jun 26, 2025
d8c6135
Update label_pr.yaml
bcExpt1123 Jun 26, 2025
39b1929
📝 Add docstrings to `test`
coderabbitai[bot] Oct 2, 2025
f0f793d
Merge pull request #6 from bcExpt1123/coderabbitai/docstrings/ce41903
bcExpt1123 Oct 2, 2025
59d5b55
Rename package
bcExpt1123 Oct 6, 2025
abcce9b
Update summarize new issue workflwo
bcExpt1123 Oct 6, 2025
9c61236
Update .github/workflows/summarize_new_issue.yaml
bcExpt1123 Oct 6, 2025
16e4b2e
Merge pull request #5 from bcExpt1123/workflows
bcExpt1123 Oct 6, 2025
ba286a2
Update src/main/java/org/dsa/common/Utils.java
bcExpt1123 Oct 6, 2025
a64306d
Update Main.java - scanner, and revert Utils
bcExpt1123 Oct 6, 2025
48381cf
Update workflows
bcExpt1123 Oct 6, 2025
ab12e16
Update workflows
bcExpt1123 Oct 6, 2025
90b555b
Update workflows
bcExpt1123 Oct 6, 2025
f569726
Update workflows
bcExpt1123 Oct 6, 2025
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
14 changes: 14 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CodeQL analysis

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 3 * * 0'

jobs:
call-codeQL-analysis:
name: CodeQL analysis
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
22 changes: 22 additions & 0 deletions .github/workflows/label_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Pull Request Labeler
on: [pull_request_target]

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
36 changes: 36 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 23
uses: actions/setup-java@v4
with:
java-version: '23'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
if: github.event_name == 'push'
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
41 changes: 41 additions & 0 deletions .github/workflows/pmd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: pmd

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
pmd-code-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Run PMD
id: pmd
uses: pmd/pmd-github-action@v2
with:
rulesets: 'rulesets/java/quickstart.xml'
sourcePath: 'src/main/java'
analyzeModifiedFilesOnly: false
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: pmd-report.sarif
33 changes: 33 additions & 0 deletions .github/workflows/summarize_new_issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Summarize new issues

on:
issues:
types: [opened]

jobs:
summary:
runs-on: ubuntu-latest
permissions:
issues: write
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run AI inference
id: inference
uses: actions/ai-inference@v1
with:
prompt: |
Summarize the following GitHub issue in one paragraph:
Title: ${{ github.event.issue.title }}
Body: ${{ github.event.issue.body }}

- name: Comment with AI summary
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
RESPONSE: ${{ steps.inference.outputs.response }}
run: |
gh issue comment "$ISSUE_NUMBER" --body "$RESPONSE"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Thank you for taking the time to contribute to this project! Here are a few guid

2. **Clone the repository**: Clone your forked repository to your local machine using the following command:
```sh
git clone https://github.com/your-username/java-alda.git
git clone https://github.com/your-username/java-dsa.git
```

3. **Create a branch**: Create a new branch for your work using the following command:
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Java Algorithms and Data Structures
# Java Data Structures and Algorithms

This repository contains implementations of various algorithms and data structures in Java. It is intended as a resource for learning and reference.

Expand Down Expand Up @@ -94,11 +94,11 @@ Implementation and usage of graphs.

1. Clone the repository:
```sh
git clone https://github.com/bcExpt1123/java-alda.git
git clone https://github.com/bcExpt1123/java-dsa.git
```
2. Navigate to the project directory:
```sh
cd java-alda
cd java-dsa
```

## Usage
Expand All @@ -107,11 +107,21 @@ Run code:
```sh
mvn clean compile exec:java
```

Run test:
```sh
mvn test
```

Run Check style:
```sh
mvn checkstyle:check
```
Or
```sh
mvn checkstyle:checkstyle
```

## Contributing

Contributions are welcome! Please read the [contributing guidelines](CONTRIBUTING.md) for more details.
Expand Down
21 changes: 21 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">

<!-- Line length should be a direct child of Checker -->
<module name="LineLength">
<property name="max" value="120"/>
</module>

<module name="TreeWalker">
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="RightCurly"/>
<module name="NeedBraces"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
</module>
</module>
28 changes: 25 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>algo-datastructure</artifactId>
<artifactId>java-dsa</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<exec.mainClass>org.alda.Main</exec.mainClass>
<exec.mainClass>org.dsa.Main</exec.mainClass>
</properties>
<dependencies>
<dependency>
Expand All @@ -28,5 +28,27 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading
Loading