Skip to content

fix: remove false positive of unused jobs - #275

Merged
JulesFaucherre merged 2 commits into
mainfrom
fix-job-unused-for-local-orbs
Feb 20, 2024
Merged

fix: remove false positive of unused jobs#275
JulesFaucherre merged 2 commits into
mainfrom
fix-job-unused-for-local-orbs

Conversation

@JulesFaucherre

Copy link
Copy Markdown

Jira: None

Description

Removes "Job is unused" diagnostic from used local orb jobs.

Implementation details

When running a validation, sub-validations are run for each local orb, considering the local orb as a document on its own. Since jobs were not used in the context of this local orb sub document, a diagnostic of "Job is unused" was set.
To address this issue, Job is unused and Command is unused are not evaluated when validating a local orb.

Took advantage of this PR to also reduce the validation that was done for local orbs.

How to validate

Wrote tests but don't hesitate to write your own file with a local orb that have jobs and make sure they don't have the diagnostic.

@JulesFaucherre JulesFaucherre changed the title fix false positive of unused jobs fix: remove false positive of unused jobs Feb 6, 2024
@JulesFaucherre
JulesFaucherre force-pushed the local-orbs-go-to-definition branch from 43d9397 to a399d77 Compare February 6, 2024 15:20
@JulesFaucherre
JulesFaucherre force-pushed the fix-job-unused-for-local-orbs branch from a976f28 to 20e70a2 Compare February 6, 2024 15:53
loderunner
loderunner previously approved these changes Feb 6, 2024
@JulesFaucherre
JulesFaucherre force-pushed the local-orbs-go-to-definition branch from a399d77 to 42da6f8 Compare February 6, 2024 16:16
Base automatically changed from local-orbs-go-to-definition to main February 6, 2024 16:19
@JulesFaucherre
JulesFaucherre dismissed loderunner’s stale review February 6, 2024 16:19

The base branch was changed.

@JulesFaucherre
JulesFaucherre force-pushed the fix-job-unused-for-local-orbs branch from 20e70a2 to 725b69b Compare February 6, 2024 16:20
@JulesFaucherre
JulesFaucherre enabled auto-merge (squash) February 6, 2024 16:20
@JulesFaucherre
JulesFaucherre force-pushed the fix-job-unused-for-local-orbs branch from 725b69b to fedfb1b Compare February 20, 2024 14:50
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