Skip to content

Commit 61e50a5

Browse files
committed
Analysis on sample project
1 parent f5453ee commit 61e50a5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ The syntax is:
3030
- `<excluded-folders>` (optional) space separated list of path substrings to exclude from analysis (e.g. `Tests` will ignore all files/folders that contain `Tests`)
3131
- `<output-directory>` (optional) path to the folder that will contain the generated textual analysis and graphs; if empty, the software will show the images to the user and print the report to the console
3232

33+
A sample project is provided in the `resources` folder; example:
34+
35+
`python3 swift-code-analyzer.py resources/ExampleProject/SwiftCodeMetricsExample --exclude Tests xcodeproj --artifacts report`
3336

3437
## Current limitations
3538

presenter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ def __init__(self, artifacts_path):
88
self.file = None
99
else:
1010
self.output_function = lambda file, txt: file.write(txt)
11+
if not os.path.exists(artifacts_path):
12+
os.makedirs(artifacts_path)
1113
self.report_path = os.path.join(artifacts_path, 'reports.txt')
1214
self.file = open(self.report_path, 'w+')
1315

0 commit comments

Comments
 (0)