Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: setup yaml linting of SBOM Catalog #73

Closed
wants to merge 3 commits into from

Conversation

idunbarh
Copy link
Contributor

@idunbarh idunbarh commented Sep 7, 2024

This PR adds yaml linting and schema validation to ensure contributions to the SBOM Catalog don't break the data and filter yaml files.

@idunbarh
Copy link
Contributor Author

idunbarh commented Sep 7, 2024

@Mariuxdeangelo I'm adding some schema validation to SBOM-Catalog/public/data.yaml and SBOM-Catalog/public/filters.yaml and had a question.

In SBOM-Catalog/public/data.yaml some of the entries are the field as Language and others as Languages (plural). The typescript interface is ...

export interface Tool {
    Name: string;
    Link: string;
    Publisher: string;
    License: string;
    Standards: Array<string>;
    Abilities: Array<string>;
    Type?: Array<string>;
    Language?: Array<string>;
};

I can easily update data.yaml for all of the entries to be singular, but it seems like the typescript interface should be updated for Type and Language to be plural to match Standards and Abilities.

Thoughts if I update the interface to be ...

export interface Tool {
    Name: string;
    Link: string;
    Publisher: string;
    License: string;
    Standards: Array<string>;
    Abilities: Array<string>;
    Types?: Array<string>;
    Languages?: Array<string>;
};

@Mariuxdeangelo
Copy link
Collaborator

@idunbarh, thanks for pointing out the singular, plural thing. I will look into that, but you're right. All Plural would be best.

It's also a great idea to add linting. I'm not 100 percent happy about adding some Python tooling to the NPM project, but it's only in the CI, so I think it's fine for now 👍.

@Mariuxdeangelo
Copy link
Collaborator

Mybe it would be a good convention to say lists are in plural and regular Strings are in singular.

@idunbarh
Copy link
Contributor Author

idunbarh commented Sep 8, 2024

@Mariuxdeangelo sounds good. I'll go ahead and make the updates for the lists to be plural in the interface and in data.yaml.

@Mariuxdeangelo
Copy link
Collaborator

Hey @idunbarh, I just took the liberty to add your PR to mine and fix the data.yaml. I recently added some more projects, so I wanted to make sure that they also adhere to the schemas.

@idunbarh
Copy link
Contributor Author

idunbarh commented Sep 8, 2024

Perfect! I'll add some additional tools once that PR is merged. I'll close this PR in the meantime.

@idunbarh idunbarh closed this Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants