Skip to content

Commit

Permalink
Merge pull request #1 from sensslen/print_copyright_and_authors
Browse files Browse the repository at this point in the history
Print copyright and authors
  • Loading branch information
notofug authored Jan 29, 2024
2 parents c50a02c + 7d5ac26 commit ac5fff5
Show file tree
Hide file tree
Showing 1,205 changed files with 109,195 additions and 23 deletions.
1 change: 1 addition & 0 deletions src/NuGetUtility/Output/Table/TableOutputFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public async Task Write(Stream stream, IList<LicenseValidationResult> results)
new ColumnDefinition("Version", license => license.PackageVersion, license => true, true),
new ColumnDefinition("License Information Origin", license => license.LicenseInformationOrigin, license => true, true),
new ColumnDefinition("License Expression", license => license.License, license => license.License != null),
new ColumnDefinition("Copyright", license => license.Copyright, license => license.Copyright != null),
new ColumnDefinition("Copyrigth", license => license.Copyright, license => license.Copyright != null),
new ColumnDefinition("Authors", license => license.Authors, license => license.Authors != null),
new ColumnDefinition("Package Project Url",license => license.PackageProjectUrl, license => license.PackageProjectUrl != null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ public async Task ValidatingLicenses_ShouldContainCopyright(

IPackageMetadata package = SetupPackageWithCopyright(packageId, packageVersion, copyright);

IEnumerable<LicenseValidationResult> result = await _uut.Validate(LicenseValidatorTest.CreateInput(package, _context));
IEnumerable<LicenseValidationResult> result = await _uut.Validate(CreateInput(package, _context), _token.Token);

Assert.That(result,
Is.EquivalentTo(new[]
Expand Down Expand Up @@ -776,7 +776,7 @@ public async Task ValidatingLicenses_ShouldContainAuthors(

IPackageMetadata package = SetupPackageWithAuthors(packageId, packageVersion, authors);

IEnumerable<LicenseValidationResult> result = await _uut.Validate(LicenseValidatorTest.CreateInput(package, _context));
IEnumerable<LicenseValidationResult> result = await _uut.Validate(CreateInput(package, _context), _token.Token);

Assert.That(result,
Is.EquivalentTo(new[]
Expand Down
42 changes: 33 additions & 9 deletions tests/NuGetUtility.Test/Output/Json/JsonOutputFormatterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,45 @@

namespace NuGetUtility.Test.Output.Json
{
[TestFixture(false, false, false)]
[TestFixture(true, false, false)]
[TestFixture(false, true, false)]
[TestFixture(true, true, false)]
[TestFixture(false, false, true)]
[TestFixture(true, false, true)]
[TestFixture(false, true, true)]
[TestFixture(true, true, true)]
[TestFixture(true, true, true, true, true)]
[TestFixture(true, true, true, true, false)]
[TestFixture(true, true, true, false, true)]
[TestFixture(true, true, true, false, false)]
[TestFixture(true, true, false, true, true)]
[TestFixture(true, true, false, true, false)]
[TestFixture(true, true, false, false, true)]
[TestFixture(true, true, false, false, false)]
[TestFixture(true, false, true, true, true)]
[TestFixture(true, false, true, true, false)]
[TestFixture(true, false, true, false, true)]
[TestFixture(true, false, true, false, false)]
[TestFixture(true, false, false, true, true)]
[TestFixture(true, false, false, true, false)]
[TestFixture(true, false, false, false, true)]
[TestFixture(true, false, false, false, false)]
[TestFixture(false, true, true, true, true)]
[TestFixture(false, true, true, true, false)]
[TestFixture(false, true, true, false, true)]
[TestFixture(false, true, true, false, false)]
[TestFixture(false, true, false, true, true)]
[TestFixture(false, true, false, true, false)]
[TestFixture(false, true, false, false, true)]
[TestFixture(false, true, false, false, false)]
[TestFixture(false, false, true, true, true)]
[TestFixture(false, false, true, true, false)]
[TestFixture(false, false, true, false, true)]
[TestFixture(false, false, true, false, false)]
[TestFixture(false, false, false, true, true)]
[TestFixture(false, false, false, true, false)]
[TestFixture(false, false, false, false, true)]
[TestFixture(false, false, false, false, false)]
public class JsonOutputFormatterTest : TestBase
{
private readonly bool _prettyPrint;
private readonly bool _omitValidLicensesOnError;
private readonly bool _skipIgnoredPackages;

public JsonOutputFormatterTest(bool prettyPrint, bool omitValidLicensesOnError, bool skipIgnoredPackages)
public JsonOutputFormatterTest(bool prettyPrint, bool omitValidLicensesOnError, bool skipIgnoredPackages, bool includeCopyright, bool includeAuthors) : base(includeCopyright, includeAuthors)
{
_prettyPrint = prettyPrint;
_omitValidLicensesOnError = omitValidLicensesOnError;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"PackageId":"Principal Functionality Agent","PackageVersion":"1.5.3","ValidationErrors":[{"Error":"Paige","Context":"https://remington.info"},{"Error":"Aletha","Context":"https://isobel.info"},{"Error":"Pearline","Context":"https://johnathon.info"},{"Error":"Eleanora","Context":"http://jaeden.info"},{"Error":"Nikolas","Context":"https://daphney.net"},{"Error":"Oceane","Context":"http://clifton.com"},{"Error":"Francisco","Context":"http://bessie.com"}],"License":"connecting the firewall won\u0027t do anything, we need to copy the digital XSS firewall!","LicenseInformationOrigin":0}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"PackageId":"Principal Paradigm Manager","PackageVersion":"0.1.4","Authors":"Elena Lakin,Elena Lakin","ValidationErrors":[{"Error":"Levi","Context":"http://coy.biz"},{"Error":"Toy","Context":"http://jonathan.name"},{"Error":"Lawson","Context":"http://nicholas.com"},{"Error":"Maddison","Context":"https://wilber.info"},{"Error":"Kenny","Context":"https://sammy.com"},{"Error":"Ellis","Context":"http://georgianna.net"},{"Error":"Velma","Context":"http://yoshiko.name"},{"Error":"Humberto","Context":"https://riley.biz"},{"Error":"Haylie","Context":"https://olin.org"},{"Error":"Annamarie","Context":"http://markus.org"}],"License":"Use the online SMTP bus, then you can program the online bus!","LicenseInformationOrigin":3},{"PackageId":"Principal Functionality Agent","PackageVersion":"1.5.3","ValidationErrors":[{"Error":"Paige","Context":"https://remington.info"},{"Error":"Aletha","Context":"https://isobel.info"},{"Error":"Pearline","Context":"https://johnathon.info"},{"Error":"Eleanora","Context":"http://jaeden.info"},{"Error":"Nikolas","Context":"https://daphney.net"},{"Error":"Oceane","Context":"http://clifton.com"},{"Error":"Francisco","Context":"http://bessie.com"}],"License":"connecting the firewall won\u0027t do anything, we need to copy the digital XSS firewall!","LicenseInformationOrigin":0},{"PackageId":"District Paradigm Orchestrator","PackageVersion":"0.6.0","PackageProjectUrl":"http://cathy.info","ValidationErrors":[{"Error":"Jerome","Context":"http://emerald.net"},{"Error":"Camren","Context":"https://sheila.org"},{"Error":"Garry","Context":"https://elbert.com"},{"Error":"Mayra","Context":"http://eriberto.name"},{"Error":"Erling","Context":"https://mackenzie.biz"},{"Error":"Elisa","Context":"https://russ.biz"},{"Error":"Betty","Context":"http://kyra.biz"},{"Error":"Kathryne","Context":"https://foster.name"}],"LicenseInformationOrigin":2},{"PackageId":"Customer Division Engineer","PackageVersion":"9.2.4","PackageProjectUrl":"http://muriel.org","Authors":"Daryl O\u0027Kon,Daryl O\u0027Kon,Daryl O\u0027Kon","ValidationErrors":[{"Error":"Maggie","Context":"http://kimberly.info"},{"Error":"Veronica","Context":"https://mya.net"},{"Error":"Marty","Context":"https://obie.net"},{"Error":"Braxton","Context":"http://flavio.net"},{"Error":"Jeramie","Context":"http://jaycee.net"},{"Error":"Dillon","Context":"https://waylon.info"},{"Error":"Oscar","Context":"https://kadin.com"},{"Error":"Gerardo","Context":"https://william.name"}],"LicenseInformationOrigin":2},{"PackageId":"Future Tactics Architect","PackageVersion":"9.7.1","ValidationErrors":[{"Error":"Isadore","Context":"http://billy.net"},{"Error":"Alice","Context":"http://vern.net"},{"Error":"King","Context":"http://trace.net"},{"Error":"Carmela","Context":"https://adolf.info"},{"Error":"Sherman","Context":"http://alec.net"}],"License":"The GB pixel is down, reboot the primary pixel so we can reboot the GB pixel!","LicenseInformationOrigin":2},{"PackageId":"District Integration Officer","PackageVersion":"1.9.3","PackageProjectUrl":"https://august.biz","Authors":"Jeanne Kiehn,Jeanne Kiehn,Jeanne Kiehn,Jeanne Kiehn","ValidationErrors":[{"Error":"Tanner","Context":"https://lilian.com"},{"Error":"Cheyanne","Context":"http://lance.org"},{"Error":"Ona","Context":"https://cyrus.name"},{"Error":"Marion","Context":"http://naomi.info"},{"Error":"Mckenna","Context":"https://jalyn.org"},{"Error":"Katharina","Context":"https://kane.biz"},{"Error":"Beulah","Context":"http://eleanora.com"},{"Error":"Birdie","Context":"https://alvah.com"},{"Error":"Keanu","Context":"https://corrine.com"},{"Error":"Reinhold","Context":"https://lyla.info"}],"LicenseInformationOrigin":4},{"PackageId":"Customer Program Consultant","PackageVersion":"5.0.4","PackageProjectUrl":"http://kieran.biz","Authors":"Douglas Ryan,Douglas Ryan,Douglas Ryan,Douglas Ryan","ValidationErrors":[{"Error":"Bettie","Context":"http://edmund.info"},{"Error":"Sadie","Context":"http://horacio.org"},{"Error":"Loraine","Context":"https://sandra.org"},{"Error":"Emil","Context":"http://dayana.net"}],"License":"Try to compress the GB system, maybe it will compress the neural system!","LicenseInformationOrigin":3},{"PackageId":"Chief Security Architect","PackageVersion":"4.2.1","PackageProjectUrl":"http://khalil.org","ValidationErrors":[{"Error":"Immanuel","Context":"https://juana.biz"},{"Error":"Maeve","Context":"https://alysha.net"},{"Error":"Sydnee","Context":"http://merle.biz"},{"Error":"Delta","Context":"https://missouri.name"},{"Error":"Doris","Context":"http://dallas.biz"},{"Error":"Samanta","Context":"https://jeremie.name"},{"Error":"Damian","Context":"http://domenic.biz"}],"License":"I\u0027ll back up the neural FTP system, that should system the FTP system!","LicenseInformationOrigin":0},{"PackageId":"Customer Tactics Architect","PackageVersion":"4.8.8","ValidationErrors":[{"Error":"Emery","Context":"https://willa.net"},{"Error":"Joanie","Context":"https://yadira.name"},{"Error":"Barry","Context":"https://vladimir.com"},{"Error":"Nannie","Context":"https://brenden.com"}],"License":"You can\u0027t parse the program without overriding the virtual SMTP program!","LicenseInformationOrigin":1},{"PackageId":"Internal Solutions Planner","PackageVersion":"1.3.8","Authors":"Sarah Goodwin,Sarah Goodwin,Sarah Goodwin,Sarah Goodwin","ValidationErrors":[{"Error":"Marianne","Context":"https://ramona.net"},{"Error":"Mariela","Context":"http://wilfredo.com"},{"Error":"Everett","Context":"http://vanessa.name"},{"Error":"Mallory","Context":"http://angeline.name"}],"LicenseInformationOrigin":0},{"PackageId":"International Interactions Strategist","PackageVersion":"6.8.4","ValidationErrors":[{"Error":"Nichole","Context":"https://arden.info"},{"Error":"Shemar","Context":"https://rhoda.name"},{"Error":"Selena","Context":"http://selmer.org"},{"Error":"Jairo","Context":"http://juanita.biz"}],"License":"Use the virtual GB monitor, then you can navigate the virtual monitor!","LicenseInformationOrigin":2},{"PackageId":"Chief Data Director","PackageVersion":"2.1.5","Authors":"Terrence Grady","ValidationErrors":[{"Error":"Nicolette","Context":"https://deven.org"},{"Error":"Jazlyn","Context":"http://grant.org"},{"Error":"Kariane","Context":"http://lemuel.net"},{"Error":"Wyatt","Context":"https://melba.net"},{"Error":"Carolyn","Context":"http://sigmund.info"}],"License":"Use the haptic PCI bandwidth, then you can generate the haptic bandwidth!","LicenseInformationOrigin":4},{"PackageId":"Principal Program Executive","PackageVersion":"2.7.6","PackageProjectUrl":"http://merritt.name","Authors":"Cesar Goldner","ValidationErrors":[{"Error":"Angelina","Context":"https://adonis.biz"},{"Error":"Electa","Context":"https://lavon.net"},{"Error":"Irma","Context":"http://precious.biz"},{"Error":"Bertha","Context":"https://kaya.biz"},{"Error":"Fredy","Context":"https://kailyn.org"},{"Error":"Eunice","Context":"http://jace.org"},{"Error":"Kayla","Context":"http://dolly.org"}],"License":"The SAS system is down, reboot the haptic system so we can reboot the SAS system!","LicenseInformationOrigin":1},{"PackageId":"Investor Tactics Strategist","PackageVersion":"1.6.5","PackageProjectUrl":"http://arch.biz","Authors":"Roberto Schuster,Roberto Schuster","ValidationErrors":[{"Error":"Lazaro","Context":"https://gaylord.name"},{"Error":"Bret","Context":"https://jewell.net"},{"Error":"Khalil","Context":"http://aiyana.com"}],"LicenseInformationOrigin":4},{"PackageId":"Investor Interactions Agent","PackageVersion":"6.5.1","PackageProjectUrl":"http://audreanne.org","Authors":"Bessie Abernathy,Bessie Abernathy,Bessie Abernathy","ValidationErrors":[{"Error":"Laury","Context":"https://cortney.org"},{"Error":"Breanna","Context":"https://assunta.info"},{"Error":"Miller","Context":"http://annabel.org"},{"Error":"Ashton","Context":"http://gina.name"},{"Error":"Dena","Context":"http://oren.org"}],"License":"You can\u0027t index the pixel without programming the cross-platform COM pixel!","LicenseInformationOrigin":2},{"PackageId":"Principal Metrics Facilitator","PackageVersion":"3.3.7","PackageProjectUrl":"http://marina.com","ValidationErrors":[{"Error":"Myles","Context":"http://nikko.name"},{"Error":"Rolando","Context":"http://nikko.name"},{"Error":"Pamela","Context":"https://aliza.net"},{"Error":"Marcella","Context":"http://helga.net"},{"Error":"Alisha","Context":"http://alyson.name"},{"Error":"Carmelo","Context":"http://michele.name"},{"Error":"Miles","Context":"https://freddie.com"},{"Error":"Kade","Context":"https://jaunita.biz"},{"Error":"Marcelina","Context":"http://donna.net"}],"License":"You can\u0027t synthesize the system without calculating the 1080p ADP system!","LicenseInformationOrigin":2},{"PackageId":"Global Infrastructure Developer","PackageVersion":"5.5.0","PackageProjectUrl":"https://austin.net","Authors":"Donald Hoeger,Donald Hoeger,Donald Hoeger,Donald Hoeger","ValidationErrors":[{"Error":"Jerrod","Context":"http://laila.com"},{"Error":"Caleigh","Context":"https://adolfo.com"},{"Error":"Daisha","Context":"http://justine.biz"},{"Error":"Americo","Context":"http://tessie.org"},{"Error":"Howard","Context":"https://luis.info"},{"Error":"Matt","Context":"https://blake.biz"},{"Error":"Quincy","Context":"https://sandra.biz"},{"Error":"Antonina","Context":"http://willow.name"},{"Error":"Jason","Context":"https://orland.com"}],"License":"generating the application won\u0027t do anything, we need to calculate the auxiliary JSON application!","LicenseInformationOrigin":1},{"PackageId":"District Infrastructure Facilitator","PackageVersion":"8.6.1","Authors":"Ted Jast,Ted Jast","ValidationErrors":[{"Error":"Gaylord","Context":"http://clyde.com"},{"Error":"Willie","Context":"http://savanna.name"},{"Error":"Aubree","Context":"https://allen.net"},{"Error":"Adan","Context":"https://gussie.net"}],"License":"I\u0027ll back up the cross-platform SQL matrix, that should matrix the SQL matrix!","LicenseInformationOrigin":2},{"PackageId":"Investor Identity Developer","PackageVersion":"4.2.0","Authors":"Mandy Rohan,Mandy Rohan,Mandy Rohan,Mandy Rohan","ValidationErrors":[{"Error":"Anika","Context":"https://silas.com"},{"Error":"Zane","Context":"https://kirsten.com"},{"Error":"Madisyn","Context":"http://murray.net"},{"Error":"Destinee","Context":"http://emanuel.net"},{"Error":"Keely","Context":"http://obie.org"},{"Error":"Caleigh","Context":"https://albin.info"},{"Error":"Flavie","Context":"http://lavonne.biz"},{"Error":"Kaitlyn","Context":"http://osborne.org"}],"LicenseInformationOrigin":1},{"PackageId":"Future Integration Analyst","PackageVersion":"9.0.4","ValidationErrors":[{"Error":"Abner","Context":"http://tavares.info"},{"Error":"Johann","Context":"http://andres.net"},{"Error":"Jaquan","Context":"http://carey.org"},{"Error":"Arvel","Context":"http://mortimer.org"},{"Error":"Alicia","Context":"http://paula.com"},{"Error":"Heidi","Context":"http://letha.name"},{"Error":"Reid","Context":"https://amely.info"},{"Error":"Nikki","Context":"https://mckayla.info"},{"Error":"Kiara","Context":"https://floyd.net"}],"LicenseInformationOrigin":0}]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"PackageId":"Future Integration Analyst","PackageVersion":"9.0.4","ValidationErrors":[{"Error":"Abner","Context":"http://tavares.info"},{"Error":"Johann","Context":"http://andres.net"},{"Error":"Jaquan","Context":"http://carey.org"},{"Error":"Arvel","Context":"http://mortimer.org"},{"Error":"Alicia","Context":"http://paula.com"},{"Error":"Heidi","Context":"http://letha.name"},{"Error":"Reid","Context":"https://amely.info"},{"Error":"Nikki","Context":"https://mckayla.info"},{"Error":"Kiara","Context":"https://floyd.net"}],"LicenseInformationOrigin":0},{"PackageId":"Principal Functionality Agent","PackageVersion":"1.5.3","ValidationErrors":[{"Error":"Paige","Context":"https://remington.info"},{"Error":"Aletha","Context":"https://isobel.info"},{"Error":"Pearline","Context":"https://johnathon.info"},{"Error":"Eleanora","Context":"http://jaeden.info"},{"Error":"Nikolas","Context":"https://daphney.net"},{"Error":"Oceane","Context":"http://clifton.com"},{"Error":"Francisco","Context":"http://bessie.com"}],"License":"connecting the firewall won\u0027t do anything, we need to copy the digital XSS firewall!","LicenseInformationOrigin":0},{"PackageId":"Principal Metrics Facilitator","PackageVersion":"3.3.7","PackageProjectUrl":"http://marina.com","ValidationErrors":[{"Error":"Myles","Context":"http://nikko.name"},{"Error":"Rolando","Context":"http://nikko.name"},{"Error":"Pamela","Context":"https://aliza.net"},{"Error":"Marcella","Context":"http://helga.net"},{"Error":"Alisha","Context":"http://alyson.name"},{"Error":"Carmelo","Context":"http://michele.name"},{"Error":"Miles","Context":"https://freddie.com"},{"Error":"Kade","Context":"https://jaunita.biz"},{"Error":"Marcelina","Context":"http://donna.net"}],"License":"You can\u0027t synthesize the system without calculating the 1080p ADP system!","LicenseInformationOrigin":2}]
Loading

0 comments on commit ac5fff5

Please sign in to comment.