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

Add --stdout flag to CLI params #575

Conversation

abhinavbansal19961996
Copy link
Contributor

@abhinavbansal19961996 abhinavbansal19961996 commented Apr 3, 2024

Fixes #503

Types of changes

  • Enhancement (project structure, spelling, grammar, formatting)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My code follows the code style of this project. #
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

A description of the changes proposed in the Pull Request

This fixes this high priority issue: #503

  1. I have introduced new flag --stdout in the ie command. When a user doesn't supply this flag, output won't be printed (Note that earlier it used to get printed in JSON format if no plugin is supplied or plug name is 'log') (Breaking change)
  2. When --stdout flag is supplied, output will be printed in YAML format.

passed

@abhinavbansal19961996 abhinavbansal19961996 force-pushed the std-output-log branch 2 times, most recently from 1e96081 to 27cc1fc Compare April 3, 2024 19:56
@jmcook1186
Copy link
Contributor

wow that was fast- thanks, we'll look over this in our internal PR triage call tomorrow.

src/util/args.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@jmcook1186 jmcook1186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this - requested some small changes

import {sciEInputData} from '../test-data/sci-e';

import * as YAML from 'js-yaml';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please import libs from the beginning of the file, and then newline, then other internal dependencies

@@ -1,5 +1,5 @@
import {ExportLog} from '../../../builtins/export-log';

import * as YAML from 'js-yaml';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same here

@@ -1,5 +1,5 @@
import {Context} from '../types/manifest';

import * as YAML from 'js-yaml';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Signed-off-by: Abhinav Bansal <[email protected]>
@abhinavbansal19961996
Copy link
Contributor Author

@narekhovhannisyan @jmcook1186 Addressed. Pls re-review.

@narekhovhannisyan narekhovhannisyan changed the title feat(src): add --stdout flag Add --stdout flag to CLI params Apr 8, 2024
@narekhovhannisyan
Copy link
Member

Hi @abhinavbansal19961996, I have executed the code locally, and everything looks fine! However, it's weird that if we are executing manifest without output and stdout flags, then it executes without any notification. So I'm pushing commit which will notify on console that none of stdout nor output flags are provided.

@narekhovhannisyan narekhovhannisyan dismissed jmcook1186’s stale review April 11, 2024 20:56

Requested changes where fixed.

@MariamKhalatova MariamKhalatova merged commit bfc1f8c into Green-Software-Foundation:main Apr 11, 2024
1 check passed
This was referenced May 17, 2024
@github-actions github-actions bot mentioned this pull request Jun 11, 2024
@github-actions github-actions bot mentioned this pull request Jun 13, 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.

Implement --stdout flag
4 participants