Skip to content
New issue

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

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

Already on GitHub? # to your account

rule formatting #14

Closed
CagtayFabry opened this issue Oct 9, 2023 · 2 comments
Closed

rule formatting #14

CagtayFabry opened this issue Oct 9, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@CagtayFabry
Copy link
Collaborator

CagtayFabry commented Oct 9, 2023

All rules should have the following metadata:

  • a "group" (e.g. error, warning, deprecation, formatting)
  • a number
  • the line number where the error is detected
  • an output text

When a rule is "triggered" (rule is broken), the text output should reflect the metadata in the message, e.g.
The message should also show the filename (e.g. EXAMPLE_FILE.JBI in the code below)

EXAMPLE_FILE.JBI - JBI-W1 [20]: called SETREG MREG# from folder other than TWINCAT_KOMMUNIKATION

@CagtayFabry CagtayFabry added the enhancement New feature or request label Oct 9, 2023
@CagtayFabry
Copy link
Collaborator Author

for now, set all rules to "warning"

@CagtayFabry
Copy link
Collaborator Author

I have added that the message should include the filename as well @barisccolak

This should be helpful when running the script over multiple files at once

barisccolak added a commit that referenced this issue Oct 11, 2023
…rule class is defined, #17 documentation is started. Ruff check and black check completed.
@barisccolak barisccolak mentioned this issue Oct 11, 2023
barisccolak added a commit that referenced this issue Oct 25, 2023
* Rule class is created, third rule is developing.

* #18 rule defined, #14 rule formatting completed, #20 rule defined, #22 rule class is defined, #17 documentation is started. Ruff check and black check completed.

* #15 new rule implemented.

* #19 implemented (CALL JOB:TRIGGER around ARCON/ARCOFF commands)

* Script is modified to work on a multiple file (#24) and pre-commit created (#23)

* Test folder with two JBI files is created.

* Working on GitHub Actions.

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Update githubaction.yml

* Set USERFRAME bug is corrected.

* Extra test files are added.

* check_E (#15) bug is corrected.

* check_B (#11) bug is corrected.

* check_D (#18) int bug argument is corrected.

* Not UTF-8 encoded file handling is added.

* Error Flag is implemented.

* No Foldername is accepted.

* Black applied.

* Some reformating.

* Some reformating.

* Apply suggestions from code review

Co-authored-by: Çağtay Fabry <cagtay.fabry@bam.de>

* Files folder is deleted.

* check_D bug solved.

* check_D bug solved.

* Review notes are implemented and updated.

* Comments are corrected. Segmentation of the classes and error handling improved.

---------

Co-authored-by: Çağtay Fabry <cagtay.fabry@bam.de>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants