Skip to content

Commit

Permalink
Improvements from call.
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpojer committed Jun 20, 2024
1 parent d1e6021 commit 977616c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The **Filename Inspector** GitHub Action is designed to ensure naming convention
This action scans the specified `paths` for project files and checks if their file names fit the `name_patterns.` It reports the count of files not meeting the naming conventions, with options to fail the action if violations are found.

## Inputs
### `name_patterns`
### `name-patterns`
- **Description**: List of file name [glob](https://en.wikipedia.org/wiki/Glob_(programming)) patterns that project files should have, separated by commas.
- **Required**: Yes
- **Example**: `*UnitTest.*,*IntegrationTest.*`
Expand All @@ -42,8 +42,8 @@ This action scans the specified `paths` for project files and checks if their fi
- **Default**: `console`
- **Options**:
- `console`: Prints the list of violated files to the console.
- `csv`: Generates a CSV file with the report. No output prints to the console. Path to the report file is provided in the `report-path` output.
- `json`: Generates a JSON file with the report. No output prints to the console. Path to the report file is provided in the `report-path` output.
- `csv`: Generates a CSV file with the report. No printout of violated files to the console, unless verbose is enabled. Path to the report file is provided in the `report-path` output.
- `json`: Generates a JSON file with the report. No printout of violated files to the console, unless verbose is enabled. Path to the report file is provided in the `report-path` output.

### `verbose-logging`
- **Description**: Enable verbose logging to provide detailed output during the action’s execution, aiding in troubleshooting and setup.
Expand Down
3 changes: 1 addition & 2 deletions src/filename_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ def run():
set_action_output('violation-count', str(violation_count))

logging.info(f'Total violations: {violation_count}')
logging.debug(f'Violating files: {violations}')

if report_format == 'console' and not verbose_logging:
if report_format == 'console' or verbose_logging:
logging.info(f'Violating files: {violations}')

if report_format == 'csv':
Expand Down

0 comments on commit 977616c

Please sign in to comment.