Giter Club home page Giter Club logo

duke's Introduction

Duke

This is a project template for a greenfield Java project. It's named after the Java mascot Duke. Given below are instructions on how to use it.

Demo

output

Build

Prerequisites: Have bazel installed.

To build for local development on macOS:

# bazel makes a wrapper script around the jar file.
bazel build //:TerminalDuke && ./bazel-bin/TerminalDuke

# or simply
bazel run //:TerminalDuke

# Use bazelisk for M1 Macs (Apple Silicon)
USE_BAZEL_VERSION=ac9353fab161efae4af72e73fbb657a762b3620d bazelisk run //:TerminalDuke

# For QA build, for example, having assertions enabled, build TerminalDukeQA instead
USE_BAZEL_VERSION=ac9353fab161efae4af72e73fbb657a762b3620d bazelisk run //:TerminalDukeQA

To build jar file for deployment purposes:

bazel build //:Duke_deploy.jar

java -jar ./bazel-bin/Duke_deploy.jar

Testing

For unit tests:

bazel test --test_output=all //...

For terminal ui tests (text-ui-test):

cd text-ui-test
./runtest.sh

Code Formatting & Style

Use google-java-format:

google-java-format --replace **/*.java # executes recursively

Pre-commit Git Hook (Tested on macOS)

pre-commit is a python tool that helps to create git pre-commit hook handlers. For this project, it is used to enforce Google Java Style (via google-java-format) on new commits.

To setup, ensure you have pre-commit installed, then run:

pre-commit install

This only needs to be executed once, so that pre-commit can generate the script and write it to .git/hooks/pre-commit Thereafter, it should be executed right before every commit!

duke's People

Contributors

lockarhythm avatar j-lum avatar 9y5 avatar damithc avatar jiachen247 avatar

duke's Issues

Sharing iP code quality feedback [for @lockarhythm]

@lockarhythm We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, to help you improve the iP code further.

IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most three example are given i.e., there can be other areas/places to improve.

Aspect: Tab Usage

No easy-to-detect issues ๐Ÿ‘

Aspect: Naming boolean variables/methods

Example from src/main/java/com/lockarhythm/query/sort/SortResponder.java lines 8-8:

  private static final boolean DEFAULT_SORT_ORDER = true;

Suggestion: Follow the given naming convention for boolean variables/methods (e.g., use a boolean-sounding prefix).You may ignore the above if you think the name already follows the convention (the script can report false positives in some cases)

Aspect: Brace Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Package Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Class Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Dead Code

No easy-to-detect issues ๐Ÿ‘

Aspect: Method Length

No easy-to-detect issues ๐Ÿ‘

Aspect: Class size

No easy-to-detect issues ๐Ÿ‘

Aspect: Header Comments

No easy-to-detect issues ๐Ÿ‘

โ„น๏ธ The bot account @nus-se-bot used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact [email protected] if you want to follow up on this post.

Sharing iP code quality feedback [for @lockarhythm] - Round 2

@lockarhythm We did an automated analysis of your code to detect potential areas to improve the code quality. The script did not detect any issues in your code (nice!).

IMPORTANT: Note that the script looked for just a few easy-to-detect problems only i.e., there can be other areas/places to improve.

Aspect: Tab Usage

No easy-to-detect issues ๐Ÿ‘

Aspect: Naming boolean variables/methods

No easy-to-detect issues ๐Ÿ‘

Aspect: Brace Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Package Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Class Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Dead Code

No easy-to-detect issues ๐Ÿ‘

Aspect: Method Length

No easy-to-detect issues ๐Ÿ‘

Aspect: Class size

No easy-to-detect issues ๐Ÿ‘

Aspect: Header Comments

No easy-to-detect issues ๐Ÿ‘

โ„น๏ธ The bot account @nus-se-bot used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact [email protected] if you want to follow up on this post.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.