You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,13 +12,21 @@ poetry run rsmetacheck --input https://github.com/tidyverse/tidyverse
12
12
13
13
### Analyze a Specific Branch
14
14
15
+
Use `--branch` (short: `-b`) to target a non-default branch:
16
+
15
17
```bash
16
18
poetry run rsmetacheck --input https://github.com/tidyverse/tidyverse --branch develop
17
19
```
18
20
19
-
### Analyze Multiple Repositories from a JSON File
21
+
### Analyze Multiple Repositories
22
+
23
+
Pass several URLs directly on the command line:
24
+
25
+
```bash
26
+
poetry run rsmetacheck --input https://github.com/example/repo_1 https://github.com/example/repo_2
27
+
```
20
28
21
-
Create a `repositories.json` file:
29
+
Or create a `repositories.json` file and pass it as the input:
22
30
23
31
```json
24
32
{
@@ -29,48 +37,146 @@ Create a `repositories.json` file:
29
37
}
30
38
```
31
39
32
-
Run the analysis:
33
-
34
40
```bash
35
41
poetry run rsmetacheck --input repositories.json
36
42
```
37
43
44
+
### Customize Output Paths
45
+
46
+
By default RSMetaCheck writes its output to the current working directory. Use the flags below to redirect any of the outputs:
47
+
48
+
| Flag | Default | Description |
49
+
|------|---------|-------------|
50
+
|`--somef-output`|`./somef_outputs`| Directory for raw SoMEF JSON files |
51
+
|`--pitfalls-output`|`./pitfalls_outputs`| Directory for per-repository pitfall JSON-LD files |
52
+
|`--analysis-output`|`./analysis_results.json`| File for the overall summary report |
53
+
|`--notes-output`|*(not created)*| File for minor version-discrepancy notes (see below) |
54
+
55
+
```bash
56
+
poetry run rsmetacheck --input repositories.json \
57
+
--somef-output ./results/somef \
58
+
--pitfalls-output ./results/pitfalls \
59
+
--analysis-output ./results/summary.json \
60
+
--notes-output ./results/notes.json
61
+
```
62
+
63
+
### Version Discrepancy Notes
64
+
65
+
When a metadata version differs from the release version only slightly (every component differs by less than 2, e.g. `0.4.3.dev1` vs `0.4.2`), RSMetaCheck records a **note** instead of a full pitfall. Notes are only written when `--notes-output` is provided:
66
+
67
+
```bash
68
+
poetry run rsmetacheck --input https://github.com/example/repo --notes-output ./notes.json
69
+
```
70
+
71
+
Example notes file:
72
+
73
+
```json
74
+
{
75
+
"total_notes": 1,
76
+
"notes": [
77
+
{
78
+
"repository": "example/repo",
79
+
"file_name": "repo_output.json",
80
+
"code": "P001",
81
+
"note": "Version discrepancy: metadata '0.4.3.dev1' vs release '0.4.2'"
82
+
}
83
+
]
84
+
}
85
+
```
86
+
87
+
When the difference is significant (any component differs by 2 or more, e.g. `0.12.4` vs `0.12.1`), the issue is still reported as a pitfall regardless.
88
+
89
+
### Skip SoMEF and Analyze Existing Outputs
90
+
91
+
If you have already run SoMEF separately, pass `--skip-somef` and point `--input` at the existing JSON files to avoid re-running SoMEF:
92
+
93
+
```bash
94
+
poetry run rsmetacheck --skip-somef --input somef_outputs/*.json
95
+
```
96
+
97
+
Multiple glob patterns are supported:
98
+
99
+
```bash
100
+
poetry run rsmetacheck --skip-somef --input my_somef_outputs_1/*.json my_somef_outputs_2/*.json
101
+
```
102
+
103
+
### Verbose Output
104
+
105
+
By default, only detected pitfalls and warnings appear in the output JSON-LD files. Use `--verbose` to also include checks that passed:
106
+
107
+
```bash
108
+
poetry run rsmetacheck --input https://github.com/tidyverse/tidyverse --verbose
109
+
```
110
+
111
+
### SoMEF Confidence Threshold
112
+
113
+
Use `--threshold` to control how confident SoMEF must be before including a metadata field (default: `0.8`):
114
+
115
+
```bash
116
+
poetry run rsmetacheck --input https://github.com/example/repo --threshold 0.6
117
+
```
118
+
119
+
### Generate CodeMeta Files
120
+
121
+
Use `-c` / `--generate-codemeta` to instruct SoMEF to also produce a `codemeta.json` file for each repository:
122
+
123
+
```bash
124
+
poetry run rsmetacheck --input https://github.com/example/repo --generate-codemeta
125
+
```
126
+
38
127
### Configure Analysis Rules
39
128
40
-
RsMetaCheck can load a root-level `.rsmetacheck.toml` file to customize analysis behavior.
129
+
RSMetaCheck automatically detects a `.rsmetacheck.toml` (or `rsmetacheck.toml`) file at the working directory. Alternatively, supply a custom path with `--config`:
130
+
131
+
```bash
132
+
poetry run rsmetacheck --input https://github.com/example/repo --config ./ci/rsmetacheck.toml
133
+
```
134
+
135
+
Supported configuration keys:
136
+
137
+
-`ignore` — list of pitfall/warning codes to skip (e.g. `"P001"`, `"W002"`)
138
+
-`exclude_files` — glob patterns, filenames, or substrings of metadata sources to ignore
139
+
-`parameters` — per-check tunable parameters
140
+
-`active_profile` — name of the profile to activate automatically when no `--config-profile` flag is passed
141
+
-`profiles` — named groups of overrides that can be selected at runtime
poetry run rsmetacheck --input https://github.com/example/repo --config-profile unstable
162
+
[profiles.prerelease]
163
+
ignore = []
164
+
165
+
[profiles.prerelease.parameters.P001]
166
+
ahead_significant_diff = 1
60
167
```
61
168
62
-
Use an explicit config path:
169
+
Activate a profile from the command line (overrides `active_profile`):
63
170
64
171
```bash
65
-
poetry run rsmetacheck --input https://github.com/example/repo --config ./ci/rsmetacheck.toml
172
+
poetry run rsmetacheck --input https://github.com/example/repo --config-profile unstable
66
173
```
67
174
68
175
## GitHub Action
69
176
70
-
You can integrate RSMetaCheck into your GitHub workflow to test your own repository and detect issues automatically.
177
+
You can integrate RSMetaCheck into your GitHub workflow to test your own repository and detect issues automatically.
71
178
Please refer to our action in the GitHub MarketPlace at [rsmetacheck actions](https://github.com/marketplace/actions/rsmetacheck) for more information.
72
179
73
-
74
180
## GitLab CI/CD
75
181
76
182
You can integrate RSMetaCheck into your GitLab pipelines by adding the following snippet to your `.gitlab-ci.yml` file:
@@ -94,3 +200,24 @@ rsmetacheck:
94
200
95
201
`$CI_PROJECT_URL` is a [built-in GitLab CI/CD variable](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) that automatically resolves to your repository's URL.
96
202
203
+
### Providing a GitHub Token (recommended)
204
+
205
+
SoMEF fetches repository metadata from GitHub's API. Without a token, anonymous requests are subject to low rate limits. Store your GitHub personal access token as a [GitLab CI/CD variable](https://docs.gitlab.com/ee/ci/variables/) named `GITHUB_TOKEN` and pass it to `somef configure`:
0 commit comments