Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code compliance checks #214

Merged
merged 36 commits into from
Aug 19, 2023
Merged

Conversation

QU35T-code
Copy link
Member

@QU35T-code QU35T-code commented Aug 18, 2023

Description

#215

  1. Added a python parser that will check that the required functions are present for each tool installation
  • colorecho
  • add-aliases
  • add-history
  • add-test-command
  • add-to-list

A whitelisting feature is also present when the function is not required with :

# CODE-CHECK-WHITELIST=add-aliases

  1. Revert dockerfiles for better logging

@QU35T-code QU35T-code changed the title Add tree-sitter Add code-check (tree-sitter) Aug 18, 2023
@QU35T-code QU35T-code added enhancement New feature or request on hold Item on hold. Requires another matter to be resolved first. labels Aug 18, 2023
Copy link
Member

@ShutdownRepo ShutdownRepo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File structure

The .conf files and parser.py are placed in the assets directory, however, we don't need them inside the container. I think it would make more sense to move the code-check directory in the parent dir, in the sources dir and place the necessary files in it as follows

code-check
├── tree-sitter-parser.py
└── tree-sitter.conf.d
    ├── add-aliases.conf
    ├── add-history.conf
    ├── add-test-command.conf
    ├── add-to-list.conf
    └── colorecho.conf

Workflow structure

The code check seems to be called by entrypoint_pull_request.yml only. Let's move this content in a sub_code_check.yml file and nest in the other entrypoints: pull requests, nightly, prerelease

.github/workflows/entrypoint_pull_request.yml Outdated Show resolved Hide resolved
sources/install/package_base.sh Outdated Show resolved Hide resolved
sources/install/package_base.sh Outdated Show resolved Hide resolved
.github/workflows/entrypoint_pull_request.yml Outdated Show resolved Hide resolved
@ShutdownRepo
Copy link
Member

Did most changes except changing the rust and cargo setup with actions-rs/toolchain@v1

@ShutdownRepo ShutdownRepo changed the title Add code-check (tree-sitter) Add code compliance checks Aug 19, 2023
@QU35T-code QU35T-code removed the on hold Item on hold. Requires another matter to be resolved first. label Aug 19, 2023
@ShutdownRepo ShutdownRepo linked an issue Aug 19, 2023 that may be closed by this pull request
@ShutdownRepo
Copy link
Member

Merging, nice job here

@ShutdownRepo ShutdownRepo merged commit 15b188c into ThePorgs:dev Aug 19, 2023
14 of 24 checks passed
@QU35T-code QU35T-code deleted the ci/tree-sitter branch August 19, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Compliance Checks
2 participants