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
Copy file name to clipboardExpand all lines: README.md
+26-15Lines changed: 26 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,18 +57,20 @@ Then use `packageguard --help` to see a list of options.
57
57
58
58
```
59
59
USAGE:
60
-
PackageGuard.dll [path] [OPTIONS]
60
+
PackageGuard.dll [path] [OPTIONS]
61
61
62
62
ARGUMENTS:
63
63
[path] The path to a directory containing a .sln file, a specific .sln file, or a specific .csproj file. Defaults to the current working directory
64
64
65
65
OPTIONS:
66
-
-h, --help Prints help information
67
-
--configPath The path to the configuration file. Defaults to the config.json in the current working directory
68
-
--restore-interactive Allow enabling or disabling an interactive mode of "dotnet restore". Defaults to true
69
-
--force-restore Force restoring the NuGet dependencies, even if the lockfile is up-to-date
70
-
--skip-restore Prevent the restore operation from running, even if the lock file is missing or out-of-date
71
-
--github-api-key GitHub API key to use for fetching package licenses. If not specified, you may run into GitHub's rate limiting issues
66
+
-h, --help Prints help information
67
+
-c, --config-path The path to the configuration file. Defaults to the config.json in the current working directory
68
+
-i, --restore-interactive Allow enabling or disabling an interactive mode of "dotnet restore". Defaults to true
69
+
-f, --force-restore Force restoring the NuGet dependencies, even if the lockfile is up-to-date
70
+
-s, --skip-restore Prevent the restore operation from running, even if the lock file is missing or out-of-date
71
+
-a, --github-api-key GitHub API key to use for fetching package licenses. If not specified, you may run into GitHub's rate limiting issues
72
+
--use-caching Maintains a cache of the package information to speed up future analysis
73
+
--cache-file-path Overrides the file path where analysis data is cached. Defaults to the "<workingdirectory>/.packageguard/.cache"
72
74
```
73
75
74
76
## How do I configure it?
@@ -149,6 +151,14 @@ The exit code indicates either 0 for success or 1 for failure.
149
151
150
152
## Additional notes
151
153
154
+
### Speeding up the analysis using caching
155
+
156
+
One of the most expensive operations that PackageGuard needs to do is to download find the license information from GitHub or other sources. You can significantly speed-up the analysis process by using the `--use-caching` flag.
157
+
158
+
By default, this will cause PackageGuard to persist the license information it retrieved to a binary file under `.packageguard\.cache`. You can commit this file to source control so successive runs can reuse the license information it collected during a previous run.
159
+
160
+
If PackageGuard finds new packages in your project or solution that did not exist during the previous run, then it will update the cache after the analysis is completed.
161
+
152
162
### Github rate limiting issues
153
163
154
164
If you're running into errors from GitHub like
@@ -163,21 +173,20 @@ After having generated such a token, pass it to PackageGuard through its `github
163
173
164
174
This is a rough list of items from my personal backlog that I'll be working on the coming weeks.
165
175
166
-
**Complete the MVP**
176
+
**Major features**
177
+
- Add support for the new .slnx file
178
+
- Add NPM support
179
+
180
+
**Minor features**
167
181
- Allow specifying the location of `dotnet.exe`
168
182
- Allow ignoring certain .csproj files or folders using Globs or wildcards (e.g. build.csproj)
169
183
- Allow marking all violations as a warning
170
184
- Allow marking individual violations as a warning
171
-
- Add caching of licenses
172
185
- Expose the internal engine through the `PackageGuard.Core` NuGet package
173
186
- Add direct support for [Nuke](https://nuke.build/)
174
187
- Allow loading settings from the directory of the scanned project and move up if not found
175
188
- Display the reason why a package was marked as a violation
176
189
177
-
**Major features**
178
-
- Add support for the new .slnx file
179
-
- Add NPM support
180
-
181
190
## Building
182
191
183
192
To build this repository locally, you need the following:
@@ -220,9 +229,13 @@ This library wouldn't have been possible without the following tools, packages a
220
229
*[ReportGenerator](https://reportgenerator.io/) - Converts coverage reports by [Daniel Palme](https://github.com/danielpalme)
221
230
*[StyleCopyAnalyzer](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) - StyleCop rules for .NET
222
231
*[Roslynator](https://github.com/dotnet/roslynator) - A set of code analysis tools for C# by [Josef Pihrt](https://github.com/josefpihrt)
*[CSharpCodingGuidelines](https://github.com/bkoelman/CSharpGuidelinesAnalyzer) - Roslyn analyzers by [Bart Koelman](https://github.com/bkoelman) to go with the [C# Coding Guidelines](https://csharpcodingguidelines.com/)
224
234
*[Meziantou](https://github.com/meziantou/Meziantou.Framework) - Another set of awesome Roslyn analyzers by [Gérald Barré](https://github.com/meziantou)
235
+
*[FluentAssertions](https://github.com/fluentassertions/fluentassertions) - Extension methods to fluently assert the outcome of .NET tests
225
236
*[Verify](https://github.com/VerifyTests/Verify) - Snapshot testing by [Simon Cropp](https://github.com/SimonCropp)
237
+
*[Pathy](https://github.com/dennisdoomen/pathy?tab=readme-ov-file#readme) - Fluently building and using file and directory paths without binary dependencies
238
+
*[MemoryPack](https://github.com/Cysharp/MemoryPack) - Zero encoding extreme performance binary serializer for C# and Unity by [Yoshifumi Kawai](https://github.com/neuecc)
@@ -233,9 +246,7 @@ This library wouldn't have been possible without the following tools, packages a
233
246
234
247
*[My Blog](https://www.dennisdoomen.com)
235
248
*[Reflectify](https://github.com/dennisdoomen/reflectify) - Reflection extensions without causing dependency pains
236
-
*[Pathy](https://github.com/dennisdoomen/pathy?tab=readme-ov-file#readme) - Fluently building and using file and directory paths without binary dependencies
237
249
*[.NET Library Starter Kit](https://github.com/dennisdoomen/dotnet-package-templates) - A battle-tested starter kit for building open-source and internal NuGet libraries using "dotnet new", born from half a billion downloads
238
-
*[FluentAssertions](https://github.com/fluentassertions/fluentassertions) - Extension methods to fluently assert the outcome of .NET tests
239
250
*[C# Coding Guidelines](https://csharpcodingguidelines.com/) - Forkable coding guidelines for all C# versions
0 commit comments