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 automatic Pre-CI code-scan bug fix tool #1134

Merged
merged 26 commits into from
Aug 28, 2023
Merged

Conversation

XuehaoSun
Copy link
Contributor

@XuehaoSun XuehaoSun commented Aug 2, 2023

Type of Change

Add pre-commit check.

Description

Automatically validate and fix code formatting.

pre-commit:

pre-commit-hooks

  • fix copyright

yesqa

  • remove unused noqa

isort

  • sort import by type and alphabetically

docformatter

  • format doc string

black

  • Format code to comply with PEP8

blacken-docs

  • Format code in Markdown to comply with PEP8

prettier

  • format Markdown

ruff-pre-commit

  • fix some code specification issues detected by flake8 or other tools

How to use:
pip install pre-commit
pre-commit install
if trigger manually: pre-commit run --all-files

Expected Behavior & Potential Risk

Automatically detect and fix code formatting issues

How has this PR been tested?

Pre-CI

Dependency Change?

No

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@XuehaoSun XuehaoSun added the WIP label Aug 2, 2023
@XuehaoSun XuehaoSun marked this pull request as draft August 2, 2023 08:35
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@chensuyue chensuyue added this to the v2.3 milestone Aug 22, 2023
@XuehaoSun XuehaoSun marked this pull request as ready for review August 25, 2023 08:47
@XuehaoSun
Copy link
Contributor Author

/AzurePipelines run

@azure-pipelines
Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@chensuyue
Copy link
Contributor

/azp run Code-Scan,Model-Test,Spell-Check,UT-Basic,UT-Basic-No-Coverage,UT-Coder

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@XuehaoSun XuehaoSun force-pushed the xuehao/code-scan-auto-fix branch from 9fb5d52 to 97ee9c3 Compare August 25, 2023 09:52
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@XuehaoSun XuehaoSun force-pushed the xuehao/code-scan-auto-fix branch from f56c558 to 2cbb204 Compare August 25, 2023 10:28
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@XuehaoSun XuehaoSun force-pushed the xuehao/code-scan-auto-fix branch from 53692a2 to 336f1e1 Compare August 25, 2023 12:53
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@XuehaoSun XuehaoSun force-pushed the xuehao/code-scan-auto-fix branch from 20031e2 to eb5961b Compare August 25, 2023 14:03
@XuehaoSun XuehaoSun requested a review from chensuyue August 25, 2023 15:46
@XuehaoSun XuehaoSun force-pushed the xuehao/code-scan-auto-fix branch from eb5961b to da50ffe Compare August 28, 2023 00:45
@XuehaoSun XuehaoSun force-pushed the xuehao/code-scan-auto-fix branch from abd0cd9 to ef1af3c Compare August 28, 2023 02:26
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@XuehaoSun XuehaoSun force-pushed the xuehao/code-scan-auto-fix branch from c9a4187 to 381ac9d Compare August 28, 2023 06:54
@chensuyue chensuyue removed the WIP label Aug 28, 2023
@chensuyue chensuyue merged commit f77a2c7 into master Aug 28, 2023
@chensuyue chensuyue deleted the xuehao/code-scan-auto-fix branch August 28, 2023 08:59
XuehaoSun added a commit that referenced this pull request Sep 1, 2023
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
chensuyue pushed a commit to chensuyue/lpot that referenced this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants