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
3 changes: 0 additions & 3 deletions .devcontainer/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
make
make install

# Set up pre-commit hook
cp .devcontainer/term_settings/pre-commit .git/hooks/pre-commit

# Set up ~/.bashrc
cat .devcontainer/term_settings/extra_bashrc.sh >> ~/.bashrc
4 changes: 0 additions & 4 deletions .devcontainer/term_settings/pre-commit

This file was deleted.

7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Although any topics related to opensource COBOL 4J can be posted in [Issues](htt
We will check pull requests that passed all CI checks running both tests and static code analysis.
The static analysis checks whether C and Java source files are formatted using [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [google-java-format](https://github.com/google/google-java-format) respectively, and whether [PMD](https://pmd.github.io/) finds no error and warning in Java source files.

Before you submit pull requests, you should run `./format` in order to format files in this repository.

The below sections describe how to setup and run static code analysis.

## Setup Development Environment
Expand All @@ -26,13 +28,10 @@ We strongly recommend using [Visual Studio Code with Dev Containers](https://cod
1. (Optional) Press `Ctrl+Shift+@` to open a new terminal of Visual Studio code.
1. (Optional) [Setup credentials for git](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials).

> [!CAUTION]
> In the dev container, [Git Hooks](https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks) executes code formatters when starting `git commit` command. It may take a minutes when you run `git commit` for the first time.

## Run static analysis

> [!CAUTION]
> CI executes formatters and static analysis tools in Almalinux 9. The behavior of these tools may differ from the one in other operatins systems.
> Since the behavior of these tools may differ from the one in other operatins systems, we recommend that you run `./format` in Visual Studio Code with Dev Containers described in the previous section.

### check with clang-format and google-java-format

Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ CIはテストとコードの静的解析を実行します。
CIの静的解析はCとJavaのソースコードがそれぞれ[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [google-java-format](https://github.com/google/google-java-format)で整形されているか、
[PMD](https://pmd.github.io/)によるJavaソースコードの静的解析でエラーや警告が表示されないかをチェックします。

Pull Request提出時には、./formatを実行してリポジトリ内のコードをフォーマットしてください。

下記にそれぞれのツールのセットアップと使用方法を説明します。

## 開発環境のセットアップ
Expand All @@ -26,14 +28,11 @@ CIの静的解析はCとJavaのソースコードがそれぞれ[clang-format](h
1. (オプション)`Ctrl+Shift+@`を押して、Visual Studio Codeの新しいターミナルを開きます。
1. (オプション)[gitの認証情報を設定](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials)します。

> [!CAUTION]
> Dev container内では、[Git Hooks](https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks)が`git commit`コマンドを開始する際にコードフォーマッタを実行します。初めて`git commit`を実行する際には数分かかることがあります。


## 静的解析の実行

> [!CAUTION]
> CIはAlmalinux 9でフォーマッタと静的解析ツールを実行します。これらのツールの動作は他のオペレーティングシステムとは異なる場合があります。
> これらのツールの動作は他のオペレーティングシステムとは異なる場合があります。上記のVisual Studio Code with Dev Containersの環境でフォーマッタを実行することを推奨します

### clang-formatとgoogle-java-format

Expand Down
1 change: 0 additions & 1 deletion cobj/format
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ codegen.c \
config.c \
error.c \
field.c \
pplex.c \
ppparse.c \
ppparse.h \
reserved.c \
Expand Down