From 56179da7595014f56d541014db49691275a56541 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 26 Aug 2024 12:28:32 -0400 Subject: [PATCH 01/30] feat: adds exceptable_nodes() to Rule trait --- wdl-lint/src/lib.rs | 6 +++ .../src/rules/blank_lines_between_elements.rs | 17 +++++++++ wdl-lint/src/rules/call_input_spacing.rs | 8 ++++ .../src/rules/command_mixed_indentation.rs | 8 ++++ wdl-lint/src/rules/comment_whitespace.rs | 4 ++ wdl-lint/src/rules/container_value.rs | 9 +++++ wdl-lint/src/rules/deprecated_object.rs | 11 ++++++ .../rules/deprecated_placeholder_option.rs | 9 +++++ wdl-lint/src/rules/description_missing.rs | 8 ++++ wdl-lint/src/rules/disallowed_input_name.rs | 10 +++++ wdl-lint/src/rules/disallowed_output_name.rs | 9 +++++ wdl-lint/src/rules/double_quotes.rs | 13 +++++++ wdl-lint/src/rules/ending_newline.rs | 4 ++ wdl-lint/src/rules/expression_spacing.rs | 4 ++ wdl-lint/src/rules/import_placement.rs | 8 ++++ wdl-lint/src/rules/import_sort.rs | 4 ++ wdl-lint/src/rules/import_whitespace.rs | 7 ++++ wdl-lint/src/rules/inconsistent_newlines.rs | 4 ++ wdl-lint/src/rules/input_not_sorted.rs | 8 ++++ wdl-lint/src/rules/key_value_pairs.rs | 37 ++++++++++--------- wdl-lint/src/rules/line_width.rs | 4 ++ wdl-lint/src/rules/matching_parameter_meta.rs | 8 ++++ wdl-lint/src/rules/missing_metas.rs | 10 +++++ wdl-lint/src/rules/missing_output.rs | 9 +++++ wdl-lint/src/rules/missing_requirements.rs | 8 ++++ wdl-lint/src/rules/missing_runtime.rs | 8 ++++ wdl-lint/src/rules/no_curly_commands.rs | 7 ++++ wdl-lint/src/rules/nonmatching_output.rs | 8 ++++ wdl-lint/src/rules/pascal_case.rs | 8 ++++ wdl-lint/src/rules/preamble_comments.rs | 4 ++ wdl-lint/src/rules/preamble_whitespace.rs | 4 ++ wdl-lint/src/rules/runtime_section_keys.rs | 8 ++++ wdl-lint/src/rules/section_order.rs | 9 +++++ wdl-lint/src/rules/snake_case.rs | 12 ++++++ wdl-lint/src/rules/todo.rs | 4 ++ wdl-lint/src/rules/trailing_comma.rs | 16 ++++++++ wdl-lint/src/rules/whitespace.rs | 4 ++ 37 files changed, 301 insertions(+), 18 deletions(-) diff --git a/wdl-lint/src/lib.rs b/wdl-lint/src/lib.rs index dbe46456..8e15bf83 100644 --- a/wdl-lint/src/lib.rs +++ b/wdl-lint/src/lib.rs @@ -30,6 +30,7 @@ #![warn(rustdoc::broken_intra_doc_links)] use wdl_ast::Diagnostics; +use wdl_ast::SyntaxKind; use wdl_ast::Visitor; pub mod rules; @@ -64,6 +65,11 @@ pub trait Rule: Visitor { fn url(&self) -> Option<&'static str> { None } + + /// Gets the nodes that are exceptable for this rule. + /// + /// If `None` is returned, all nodes are exceptable. + fn exceptable_nodes(&self) -> Option>; } /// Gets the default rule set. diff --git a/wdl-lint/src/rules/blank_lines_between_elements.rs b/wdl-lint/src/rules/blank_lines_between_elements.rs index 8e9765c8..3e84764f 100755 --- a/wdl-lint/src/rules/blank_lines_between_elements.rs +++ b/wdl-lint/src/rules/blank_lines_between_elements.rs @@ -102,6 +102,23 @@ impl Rule for BlankLinesBetweenElementsRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Spacing]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, + SyntaxKind::StructDefinitionNode, + SyntaxKind::InputSectionNode, + SyntaxKind::OutputSectionNode, + SyntaxKind::RuntimeSectionNode, + SyntaxKind::MetadataSectionNode, + SyntaxKind::ParameterMetadataSectionNode, + SyntaxKind::RequirementsSectionNode, + SyntaxKind::HintsSectionNode, + SyntaxKind::CommandSectionNode, + ]) + } } impl Visitor for BlankLinesBetweenElementsRule { diff --git a/wdl-lint/src/rules/call_input_spacing.rs b/wdl-lint/src/rules/call_input_spacing.rs index 2b41e16c..f712893f 100644 --- a/wdl-lint/src/rules/call_input_spacing.rs +++ b/wdl-lint/src/rules/call_input_spacing.rs @@ -77,6 +77,14 @@ impl Rule for CallInputSpacingRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style, Tag::Clarity, Tag::Spacing]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::CallStatementNode, + SyntaxKind::WorkflowDefinitionNode, + ]) + } } impl Visitor for CallInputSpacingRule { diff --git a/wdl-lint/src/rules/command_mixed_indentation.rs b/wdl-lint/src/rules/command_mixed_indentation.rs index 014ee7bb..3f294c89 100644 --- a/wdl-lint/src/rules/command_mixed_indentation.rs +++ b/wdl-lint/src/rules/command_mixed_indentation.rs @@ -96,6 +96,14 @@ impl Rule for CommandSectionMixedIndentationRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Correctness, Tag::Spacing, Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::CommandSectionNode, + ]) + } } impl Visitor for CommandSectionMixedIndentationRule { diff --git a/wdl-lint/src/rules/comment_whitespace.rs b/wdl-lint/src/rules/comment_whitespace.rs index ef2712d4..bbbb6041 100644 --- a/wdl-lint/src/rules/comment_whitespace.rs +++ b/wdl-lint/src/rules/comment_whitespace.rs @@ -86,6 +86,10 @@ impl Rule for CommentWhitespaceRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Spacing]) } + + fn exceptable_nodes(&self) -> Option> { + None + } } impl Visitor for CommentWhitespaceRule { diff --git a/wdl-lint/src/rules/container_value.rs b/wdl-lint/src/rules/container_value.rs index bc5f1e51..8be1952f 100644 --- a/wdl-lint/src/rules/container_value.rs +++ b/wdl-lint/src/rules/container_value.rs @@ -15,6 +15,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -127,6 +128,14 @@ impl Rule for ContainerValue { // use a older, cached version until the user prompts it to upgrade). TagSet::new(&[Tag::Clarity, Tag::Portability]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::RuntimeSectionNode, + SyntaxKind::RequirementsSectionNode, + ]) + } } impl Visitor for ContainerValue { diff --git a/wdl-lint/src/rules/deprecated_object.rs b/wdl-lint/src/rules/deprecated_object.rs index 1cde0608..c4a7a4e6 100644 --- a/wdl-lint/src/rules/deprecated_object.rs +++ b/wdl-lint/src/rules/deprecated_object.rs @@ -7,6 +7,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -52,6 +53,16 @@ impl Rule for DeprecatedObjectRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Deprecated]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, + SyntaxKind::BoundDeclNode, + SyntaxKind::UnboundDeclNode, + ]) + } } impl Visitor for DeprecatedObjectRule { diff --git a/wdl-lint/src/rules/deprecated_placeholder_option.rs b/wdl-lint/src/rules/deprecated_placeholder_option.rs index a809b8f3..7fb563f0 100644 --- a/wdl-lint/src/rules/deprecated_placeholder_option.rs +++ b/wdl-lint/src/rules/deprecated_placeholder_option.rs @@ -9,6 +9,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -85,6 +86,14 @@ impl Rule for DeprecatedPlaceholderOptionRule { was the version where the deprecation was introduced." } + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::PlaceholderNode, + ]) + } + fn tags(&self) -> TagSet { TagSet::new(&[Tag::Deprecated]) } diff --git a/wdl-lint/src/rules/description_missing.rs b/wdl-lint/src/rules/description_missing.rs index 3bc37956..bdd1e2e4 100644 --- a/wdl-lint/src/rules/description_missing.rs +++ b/wdl-lint/src/rules/description_missing.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -66,6 +67,13 @@ impl Rule for DescriptionMissingRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Completeness]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::MetadataSectionNode, + ]) + } } impl Visitor for DescriptionMissingRule { diff --git a/wdl-lint/src/rules/disallowed_input_name.rs b/wdl-lint/src/rules/disallowed_input_name.rs index 2369681c..fbffe883 100755 --- a/wdl-lint/src/rules/disallowed_input_name.rs +++ b/wdl-lint/src/rules/disallowed_input_name.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -72,6 +73,15 @@ impl Rule for DisallowedInputNameRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Naming]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::InputSectionNode, + SyntaxKind::BoundDeclNode, + SyntaxKind::UnboundDeclNode, + ]) + } } impl Visitor for DisallowedInputNameRule { diff --git a/wdl-lint/src/rules/disallowed_output_name.rs b/wdl-lint/src/rules/disallowed_output_name.rs index 24143ba7..2cad192a 100644 --- a/wdl-lint/src/rules/disallowed_output_name.rs +++ b/wdl-lint/src/rules/disallowed_output_name.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -72,6 +73,14 @@ impl Rule for DisallowedOutputNameRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Naming]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::OutputSectionNode, + SyntaxKind::BoundDeclNode, + ]) + } } impl Visitor for DisallowedOutputNameRule { diff --git a/wdl-lint/src/rules/double_quotes.rs b/wdl-lint/src/rules/double_quotes.rs index b7388a46..cdc4f3c4 100644 --- a/wdl-lint/src/rules/double_quotes.rs +++ b/wdl-lint/src/rules/double_quotes.rs @@ -9,6 +9,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -49,6 +50,18 @@ impl Rule for DoubleQuotesRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Clarity, Tag::Style]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, + SyntaxKind::StructDefinitionNode, + SyntaxKind::MetadataSectionNode, + SyntaxKind::ParameterMetadataSectionNode, + SyntaxKind::LiteralStringNode, + ]) + } } impl Visitor for DoubleQuotesRule { diff --git a/wdl-lint/src/rules/ending_newline.rs b/wdl-lint/src/rules/ending_newline.rs index b7c4fe3e..93db1b7a 100644 --- a/wdl-lint/src/rules/ending_newline.rs +++ b/wdl-lint/src/rules/ending_newline.rs @@ -62,6 +62,10 @@ impl Rule for EndingNewlineRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Spacing, Tag::Style]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![SyntaxKind::VersionStatementNode]) + } } impl Visitor for EndingNewlineRule { diff --git a/wdl-lint/src/rules/expression_spacing.rs b/wdl-lint/src/rules/expression_spacing.rs index 8c90ca31..9684306c 100644 --- a/wdl-lint/src/rules/expression_spacing.rs +++ b/wdl-lint/src/rules/expression_spacing.rs @@ -201,6 +201,10 @@ impl Rule for ExpressionSpacingRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Spacing]) } + + fn exceptable_nodes(&self) -> Option> { + None + } } impl Visitor for ExpressionSpacingRule { diff --git a/wdl-lint/src/rules/import_placement.rs b/wdl-lint/src/rules/import_placement.rs index e17b5140..1518997c 100644 --- a/wdl-lint/src/rules/import_placement.rs +++ b/wdl-lint/src/rules/import_placement.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -56,6 +57,13 @@ impl Rule for ImportPlacementRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::ImportStatementNode, + ]) + } } impl Visitor for ImportPlacementRule { diff --git a/wdl-lint/src/rules/import_sort.rs b/wdl-lint/src/rules/import_sort.rs index f9b78a46..72478410 100644 --- a/wdl-lint/src/rules/import_sort.rs +++ b/wdl-lint/src/rules/import_sort.rs @@ -59,6 +59,10 @@ impl Rule for ImportSortRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style, Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![SyntaxKind::VersionStatementNode]) + } } impl Visitor for ImportSortRule { diff --git a/wdl-lint/src/rules/import_whitespace.rs b/wdl-lint/src/rules/import_whitespace.rs index 4e6bd3dd..97d70f45 100644 --- a/wdl-lint/src/rules/import_whitespace.rs +++ b/wdl-lint/src/rules/import_whitespace.rs @@ -75,6 +75,13 @@ impl Rule for ImportWhitespaceRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style, Tag::Clarity, Tag::Spacing]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::ImportStatementNode, + ]) + } } impl Visitor for ImportWhitespaceRule { diff --git a/wdl-lint/src/rules/inconsistent_newlines.rs b/wdl-lint/src/rules/inconsistent_newlines.rs index c1a1555c..e3fbd5ef 100644 --- a/wdl-lint/src/rules/inconsistent_newlines.rs +++ b/wdl-lint/src/rules/inconsistent_newlines.rs @@ -52,6 +52,10 @@ impl Rule for InconsistentNewlinesRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style, Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + None + } } impl Visitor for InconsistentNewlinesRule { diff --git a/wdl-lint/src/rules/input_not_sorted.rs b/wdl-lint/src/rules/input_not_sorted.rs index d7c5f86b..658c26ba 100644 --- a/wdl-lint/src/rules/input_not_sorted.rs +++ b/wdl-lint/src/rules/input_not_sorted.rs @@ -12,6 +12,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -212,6 +213,13 @@ impl Rule for InputNotSortedRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style, Tag::Clarity, Tag::Sorting]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::InputSectionNode, + ]) + } } impl Visitor for InputNotSortedRule { diff --git a/wdl-lint/src/rules/key_value_pairs.rs b/wdl-lint/src/rules/key_value_pairs.rs index f45c7893..83f9ed93 100644 --- a/wdl-lint/src/rules/key_value_pairs.rs +++ b/wdl-lint/src/rules/key_value_pairs.rs @@ -8,6 +8,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -88,6 +89,17 @@ impl Rule for KeyValuePairsRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, + SyntaxKind::StructDefinitionNode, + SyntaxKind::MetadataSectionNode, + SyntaxKind::ParameterMetadataSectionNode, + ]) + } } impl Visitor for KeyValuePairsRule { @@ -141,9 +153,7 @@ impl Visitor for KeyValuePairsRule { .first_token() .expect("should have an opening delimiter"); if let Some(open_ws) = open_delim.next_sibling_or_token() { - if open_ws.kind() != wdl_ast::SyntaxKind::Whitespace - || !open_ws.to_string().contains('\n') - { + if open_ws.kind() != SyntaxKind::Whitespace || !open_ws.to_string().contains('\n') { state.add(missing_trailing_newline(open_delim.text_range().to_span())) } } @@ -171,8 +181,7 @@ impl Visitor for KeyValuePairsRule { // Check indentation. If there is no prior whitespace, that will have been // reported already. if let Some(prior_ws) = child.syntax().prev_sibling_or_token() { - if prior_ws.kind() == wdl_ast::SyntaxKind::Whitespace - && prior_ws.to_string().contains('\n') + if prior_ws.kind() == SyntaxKind::Whitespace && prior_ws.to_string().contains('\n') { // If there was no newline, that is already reported let ws = prior_ws.to_string(); @@ -193,9 +202,7 @@ impl Visitor for KeyValuePairsRule { // No need to check the closing delimiter as the last element must have // a newline. But we should check the indentation of the closing delimiter. if let Some(prior_ws) = close_delim.prev_sibling_or_token() { - if prior_ws.kind() == wdl_ast::SyntaxKind::Whitespace - && prior_ws.to_string().contains('\n') - { + if prior_ws.kind() == SyntaxKind::Whitespace && prior_ws.to_string().contains('\n') { let ws = prior_ws.to_string(); let ws = ws .split('\n') @@ -250,9 +257,7 @@ impl Visitor for KeyValuePairsRule { .first_token() .expect("should have an opening delimiter"); if let Some(open_ws) = open_delim.next_sibling_or_token() { - if open_ws.kind() != wdl_ast::SyntaxKind::Whitespace - || !open_ws.to_string().contains('\n') - { + if open_ws.kind() != SyntaxKind::Whitespace || !open_ws.to_string().contains('\n') { state.add(missing_trailing_newline(open_delim.text_range().to_span())) } } @@ -280,8 +285,7 @@ impl Visitor for KeyValuePairsRule { // Check indentation. If there is no prior whitespace, that will have been // reported already. if let Some(prior_ws) = child.syntax().prev_sibling_or_token() { - if prior_ws.kind() == wdl_ast::SyntaxKind::Whitespace - && prior_ws.to_string().contains('\n') + if prior_ws.kind() == SyntaxKind::Whitespace && prior_ws.to_string().contains('\n') { // If there was no newline, that is already reported let ws = prior_ws.to_string(); @@ -305,9 +309,7 @@ impl Visitor for KeyValuePairsRule { // No need to check the closing delimiter as the last element must have // a newline. But we should check the indentation of the closing delimiter. if let Some(prior_ws) = close_delim.prev_sibling_or_token() { - if prior_ws.kind() == wdl_ast::SyntaxKind::Whitespace - && prior_ws.to_string().contains('\n') - { + if prior_ws.kind() == SyntaxKind::Whitespace && prior_ws.to_string().contains('\n') { let ws = prior_ws.to_string(); let ws = ws .split('\n') @@ -340,8 +342,7 @@ fn find_next_newline(node: &wdl_ast::SyntaxNode) -> (Option TagSet { TagSet::new(&[Tag::Style, Tag::Clarity, Tag::Spacing]) } + + fn exceptable_nodes(&self) -> Option> { + None + } } impl Visitor for LineWidthRule { diff --git a/wdl-lint/src/rules/matching_parameter_meta.rs b/wdl-lint/src/rules/matching_parameter_meta.rs index 59c921d1..547c213f 100644 --- a/wdl-lint/src/rules/matching_parameter_meta.rs +++ b/wdl-lint/src/rules/matching_parameter_meta.rs @@ -14,6 +14,7 @@ use wdl_ast::Document; use wdl_ast::Ident; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -92,6 +93,13 @@ impl Rule for MatchingParameterMetaRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Completeness]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::ParameterMetadataSectionNode, + ]) + } } /// Checks for both missing and extra items in a `parameter_meta` section. diff --git a/wdl-lint/src/rules/missing_metas.rs b/wdl-lint/src/rules/missing_metas.rs index 6a2b6e71..31431883 100644 --- a/wdl-lint/src/rules/missing_metas.rs +++ b/wdl-lint/src/rules/missing_metas.rs @@ -11,6 +11,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Ident; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -113,6 +114,15 @@ impl Rule for MissingMetasRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Completeness, Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, + SyntaxKind::StructDefinitionNode, + ]) + } } impl Visitor for MissingMetasRule { diff --git a/wdl-lint/src/rules/missing_output.rs b/wdl-lint/src/rules/missing_output.rs index 2d37addf..5fd7878e 100644 --- a/wdl-lint/src/rules/missing_output.rs +++ b/wdl-lint/src/rules/missing_output.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -67,6 +68,14 @@ impl Rule for MissingOutputRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Completeness, Tag::Portability]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, + ]) + } } impl Visitor for MissingOutputRule { diff --git a/wdl-lint/src/rules/missing_requirements.rs b/wdl-lint/src/rules/missing_requirements.rs index 4f9cd495..df91f7bc 100644 --- a/wdl-lint/src/rules/missing_requirements.rs +++ b/wdl-lint/src/rules/missing_requirements.rs @@ -9,6 +9,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -60,6 +61,13 @@ impl Rule for MissingRequirementsRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Completeness, Tag::Portability]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + ]) + } } impl Visitor for MissingRequirementsRule { diff --git a/wdl-lint/src/rules/missing_runtime.rs b/wdl-lint/src/rules/missing_runtime.rs index 3ef508c8..ace6e4dc 100644 --- a/wdl-lint/src/rules/missing_runtime.rs +++ b/wdl-lint/src/rules/missing_runtime.rs @@ -8,6 +8,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -46,6 +47,13 @@ impl Rule for MissingRuntimeRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Completeness, Tag::Portability]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + ]) + } } impl Visitor for MissingRuntimeRule { diff --git a/wdl-lint/src/rules/no_curly_commands.rs b/wdl-lint/src/rules/no_curly_commands.rs index 55f70ecd..119b594a 100644 --- a/wdl-lint/src/rules/no_curly_commands.rs +++ b/wdl-lint/src/rules/no_curly_commands.rs @@ -53,6 +53,13 @@ impl Rule for NoCurlyCommandsRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::CommandSectionNode, + ]) + } } impl Visitor for NoCurlyCommandsRule { diff --git a/wdl-lint/src/rules/nonmatching_output.rs b/wdl-lint/src/rules/nonmatching_output.rs index 0b652e30..f81db9e3 100755 --- a/wdl-lint/src/rules/nonmatching_output.rs +++ b/wdl-lint/src/rules/nonmatching_output.rs @@ -13,6 +13,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -129,6 +130,13 @@ impl<'a> Rule for NonmatchingOutputRule<'a> { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Completeness]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + ]) + } } /// Check each output key exists in the `outputs` key within the `meta` section. diff --git a/wdl-lint/src/rules/pascal_case.rs b/wdl-lint/src/rules/pascal_case.rs index dc9ac1a1..a5f6af8a 100644 --- a/wdl-lint/src/rules/pascal_case.rs +++ b/wdl-lint/src/rules/pascal_case.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -49,6 +50,13 @@ impl Rule for PascalCaseRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Naming, Tag::Style, Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::StructDefinitionNode, + ]) + } } /// Checks if the given name is pascal case, and if not adds a warning to the diff --git a/wdl-lint/src/rules/preamble_comments.rs b/wdl-lint/src/rules/preamble_comments.rs index 6162959f..42f14d3f 100644 --- a/wdl-lint/src/rules/preamble_comments.rs +++ b/wdl-lint/src/rules/preamble_comments.rs @@ -71,6 +71,10 @@ impl Rule for PreambleCommentsRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Spacing, Tag::Style, Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![SyntaxKind::VersionStatementNode]) + } } impl Visitor for PreambleCommentsRule { diff --git a/wdl-lint/src/rules/preamble_whitespace.rs b/wdl-lint/src/rules/preamble_whitespace.rs index 2f200e38..2e7a1ba9 100644 --- a/wdl-lint/src/rules/preamble_whitespace.rs +++ b/wdl-lint/src/rules/preamble_whitespace.rs @@ -79,6 +79,10 @@ impl Rule for PreambleWhitespaceRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Spacing, Tag::Style]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![SyntaxKind::VersionStatementNode]) + } } impl Visitor for PreambleWhitespaceRule { diff --git a/wdl-lint/src/rules/runtime_section_keys.rs b/wdl-lint/src/rules/runtime_section_keys.rs index 7ba4f46b..d05d9856 100644 --- a/wdl-lint/src/rules/runtime_section_keys.rs +++ b/wdl-lint/src/rules/runtime_section_keys.rs @@ -19,6 +19,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Ident; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::TokenStrHash; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -314,6 +315,13 @@ impl Rule for RuntimeSectionKeysRule { fn tags(&self) -> crate::TagSet { TagSet::new(&[Tag::Completeness, Tag::Deprecated]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::RuntimeSectionNode, + ]) + } } /// A utility method to parse the recommended keys from a static set of runtime diff --git a/wdl-lint/src/rules/section_order.rs b/wdl-lint/src/rules/section_order.rs index 1c69900d..a760b5d9 100644 --- a/wdl-lint/src/rules/section_order.rs +++ b/wdl-lint/src/rules/section_order.rs @@ -11,6 +11,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -73,6 +74,14 @@ impl Rule for SectionOrderingRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style, Tag::Sorting]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, + ]) + } } /// Track the encountered sections. diff --git a/wdl-lint/src/rules/snake_case.rs b/wdl-lint/src/rules/snake_case.rs index 0cd61d79..77479692 100644 --- a/wdl-lint/src/rules/snake_case.rs +++ b/wdl-lint/src/rules/snake_case.rs @@ -19,6 +19,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -123,6 +124,17 @@ impl Rule for SnakeCaseRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Naming, Tag::Style, Tag::Clarity]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::StructDefinitionNode, + SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, + SyntaxKind::BoundDeclNode, + SyntaxKind::UnboundDeclNode, + ]) + } } impl Visitor for SnakeCaseRule { diff --git a/wdl-lint/src/rules/todo.rs b/wdl-lint/src/rules/todo.rs index 089cb061..99157f88 100644 --- a/wdl-lint/src/rules/todo.rs +++ b/wdl-lint/src/rules/todo.rs @@ -55,6 +55,10 @@ impl Rule for TodoRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Completeness]) } + + fn exceptable_nodes(&self) -> Option> { + None + } } impl Visitor for TodoRule { diff --git a/wdl-lint/src/rules/trailing_comma.rs b/wdl-lint/src/rules/trailing_comma.rs index 7a629a6a..ba6ccc15 100755 --- a/wdl-lint/src/rules/trailing_comma.rs +++ b/wdl-lint/src/rules/trailing_comma.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -63,6 +64,21 @@ impl Rule for TrailingCommaRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style]) } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![ + SyntaxKind::VersionStatementNode, + SyntaxKind::MetadataSectionNode, + SyntaxKind::ParameterMetadataSectionNode, + SyntaxKind::MetadataArrayNode, + SyntaxKind::MetadataObjectNode, + SyntaxKind::CallStatementNode, + SyntaxKind::LiteralStructNode, + SyntaxKind::LiteralArrayNode, + SyntaxKind::LiteralMapNode, + SyntaxKind::LiteralObjectNode, + ]) + } } impl Visitor for TrailingCommaRule { diff --git a/wdl-lint/src/rules/whitespace.rs b/wdl-lint/src/rules/whitespace.rs index 795355d9..69b7e8ae 100644 --- a/wdl-lint/src/rules/whitespace.rs +++ b/wdl-lint/src/rules/whitespace.rs @@ -71,6 +71,10 @@ impl Rule for WhitespaceRule { fn tags(&self) -> TagSet { TagSet::new(&[Tag::Style, Tag::Spacing]) } + + fn exceptable_nodes(&self) -> Option> { + None + } } impl Visitor for WhitespaceRule { From 54c86d5ef1a7610f5cc4195b55966cbbde5163d5 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 26 Aug 2024 12:30:01 -0400 Subject: [PATCH 02/30] chore: cargo fmt --- wdl-lint/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wdl-lint/src/lib.rs b/wdl-lint/src/lib.rs index 8e15bf83..56ced69f 100644 --- a/wdl-lint/src/lib.rs +++ b/wdl-lint/src/lib.rs @@ -67,7 +67,7 @@ pub trait Rule: Visitor { } /// Gets the nodes that are exceptable for this rule. - /// + /// /// If `None` is returned, all nodes are exceptable. fn exceptable_nodes(&self) -> Option>; } From e669756dc6ba09a207f65ed99ec3dae4d00ea2c8 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Fri, 30 Aug 2024 15:49:57 -0400 Subject: [PATCH 03/30] revise: upgrade unknown rule to full rule --- wdl-lint/src/lib.rs | 1 + wdl-lint/src/rules.rs | 2 + wdl-lint/src/rules/unknown_rule.rs | 88 +++++++++++++++++++ wdl-lint/tests/lints/except/source.errors | 16 ++++ .../tests/lints/unknown_rule/source.errors | 16 ++++ wdl-lint/tests/lints/unknown_rule/source.wdl | 8 ++ 6 files changed, 131 insertions(+) create mode 100644 wdl-lint/src/rules/unknown_rule.rs create mode 100644 wdl-lint/tests/lints/unknown_rule/source.errors create mode 100644 wdl-lint/tests/lints/unknown_rule/source.wdl diff --git a/wdl-lint/src/lib.rs b/wdl-lint/src/lib.rs index 56ced69f..a90bd8f2 100644 --- a/wdl-lint/src/lib.rs +++ b/wdl-lint/src/lib.rs @@ -111,6 +111,7 @@ pub fn rules() -> Vec> { Box::::default(), Box::::default(), Box::::default(), + Box::::default(), ]; // Ensure all the rule ids are unique and pascal case diff --git a/wdl-lint/src/rules.rs b/wdl-lint/src/rules.rs index 6a970774..25c021f4 100644 --- a/wdl-lint/src/rules.rs +++ b/wdl-lint/src/rules.rs @@ -35,6 +35,7 @@ mod section_order; mod snake_case; mod todo; mod trailing_comma; +mod unknown_rule; mod whitespace; pub use blank_lines_between_elements::*; @@ -72,4 +73,5 @@ pub use section_order::*; pub use snake_case::*; pub use todo::*; pub use trailing_comma::*; +pub use unknown_rule::*; pub use whitespace::*; diff --git a/wdl-lint/src/rules/unknown_rule.rs b/wdl-lint/src/rules/unknown_rule.rs new file mode 100644 index 00000000..df3ac305 --- /dev/null +++ b/wdl-lint/src/rules/unknown_rule.rs @@ -0,0 +1,88 @@ +//! A lint rule for flagging uknown rules in lint directives. + +use wdl_ast::AstToken; +use wdl_ast::Comment; +use wdl_ast::Diagnostic; +use wdl_ast::Diagnostics; +use wdl_ast::Document; +use wdl_ast::Span; +use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; +use wdl_ast::VisitReason; +use wdl_ast::Visitor; + +use crate::visitor::EXCEPT_COMMENT_PREFIX; +use crate::rules; +use crate::Rule; +use crate::Tag; +use crate::TagSet; + +/// The identifier for the unknown rule rule. +const ID: &str = "UnknownRule"; + +/// Creates an "unknown rule" diagnostic. +fn unknown_rule(id: &str, span: Span) -> Diagnostic { + Diagnostic::note(format!("unknown lint rule `{id}`")) + .with_rule(ID) + .with_label("cannot make an exception for this rule", span) + .with_fix("remove the rule from the exception list") +} + +/// Detects unknown rules within lint directives. +#[derive(Default, Debug, Clone, Copy)] +pub struct UnknownRule; + +impl Rule for UnknownRule { + fn id(&self) -> &'static str { + ID + } + + fn description(&self) -> &'static str { + "Flags unknown rules in lint directives." + } + + fn explanation(&self) -> &'static str { + "TODO" + } + + fn tags(&self) -> TagSet { + // TODO: Is there another tag that would be appropriate? + TagSet::new(&[Tag::Clarity]) + } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![SyntaxKind::VersionStatementNode]) + } +} + +impl Visitor for UnknownRule { + type State = Diagnostics; + + fn document(&mut self, _: &mut Self::State, _: VisitReason, _: &Document, _: SupportedVersion) { + // This is intentionally empty, as this rule has no state. + } + + fn comment(&mut self, state: &mut Self::State, comment: &Comment) { + if let Some(ids) = comment.as_str().strip_prefix(EXCEPT_COMMENT_PREFIX) { + let start: usize = comment.span().start(); + let mut offset = EXCEPT_COMMENT_PREFIX.len(); + for id in ids.split(',') { + // First trim the start so we can determine how much whitespace was removed + let trimmed_start = id.trim_start(); + // Next trim the end + let trimmed: &str = trimmed_start.trim_end(); + + // Update the offset to account for the whitespace that was removed + offset += id.len() - trimmed.len(); + + // Check if the rule is known + if !rules().iter().map(|rule| rule.id()).any(|rule_id| rule_id == trimmed) { + state.add(unknown_rule(trimmed, Span::new(start + offset, trimmed.len()))); + } + + // Update the offset to account for the rule id and comma + offset += trimmed.len() + 1; + } + } + } +} diff --git a/wdl-lint/tests/lints/except/source.errors b/wdl-lint/tests/lints/except/source.errors index 8ad5a2fe..d11b294d 100644 --- a/wdl-lint/tests/lints/except/source.errors +++ b/wdl-lint/tests/lints/except/source.errors @@ -6,6 +6,14 @@ note: unknown lint rule `Unknown` │ = fix: remove the rule from the exception list +note[UnknownRule]: unknown lint rule `Unknown` + ┌─ tests/lints/except/source.wdl:1:58 + │ +1 │ #@ except: CommentWhitespace, Whitespace, EndingNewline, Unknown + │ ^^^^^^^ cannot make an exception for this rule + │ + = fix: remove the rule from the exception list + note: unknown lint rule `AlsoUnknown` ┌─ tests/lints/except/source.wdl:21:26 │ @@ -14,6 +22,14 @@ note: unknown lint rule `AlsoUnknown` │ = fix: remove the rule from the exception list +note[UnknownRule]: unknown lint rule `AlsoUnknown` + ┌─ tests/lints/except/source.wdl:21:26 + │ +21 │ #@ except: SnakeCase,AlsoUnknown + │ ^^^^^^^^^^^ cannot make an exception for this rule + │ + = fix: remove the rule from the exception list + warning[SnakeCase]: struct member name `NotOk` is not snake_case ┌─ tests/lints/except/source.wdl:23:9 │ diff --git a/wdl-lint/tests/lints/unknown_rule/source.errors b/wdl-lint/tests/lints/unknown_rule/source.errors new file mode 100644 index 00000000..0cf0b0a3 --- /dev/null +++ b/wdl-lint/tests/lints/unknown_rule/source.errors @@ -0,0 +1,16 @@ +note: unknown lint rule `ThisIsNotARealRule` + ┌─ tests/lints/unknown_rule/source.wdl:3:12 + │ +3 │ #@ except: ThisIsNotARealRule, DescriptionMissing + │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule + │ + = fix: remove the rule from the exception list + +note[UnknownRule]: unknown lint rule `ThisIsNotARealRule` + ┌─ tests/lints/unknown_rule/source.wdl:3:12 + │ +3 │ #@ except: ThisIsNotARealRule, DescriptionMissing + │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule + │ + = fix: remove the rule from the exception list + diff --git a/wdl-lint/tests/lints/unknown_rule/source.wdl b/wdl-lint/tests/lints/unknown_rule/source.wdl new file mode 100644 index 00000000..c73f3150 --- /dev/null +++ b/wdl-lint/tests/lints/unknown_rule/source.wdl @@ -0,0 +1,8 @@ +version 1.1 + +#@ except: ThisIsNotARealRule, DescriptionMissing +workflow test { + meta {} + + output {} +} From b0b9c5f48700cf2a41bf40d158a7d522c01f044b Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 10 Sep 2024 08:49:42 -0400 Subject: [PATCH 04/30] [WIP] --- wdl-ast/src/validation.rs | 66 ++++++ .../src/rules/blank_lines_between_elements.rs | 18 +- .../rules/deprecated_placeholder_option.rs | 1 + wdl-lint/src/rules/nonmatching_output.rs | 1 + wdl-lint/src/rules/preamble_comments.rs | 2 +- wdl-lint/src/rules/unknown_rule.rs | 13 +- wdl-lint/src/visitor.rs | 214 +++++------------- .../lints/deprecated-object/source.errors | 8 + .../source.errors | 48 ++++ .../tests/lints/double-quotes/source.errors | 8 + wdl-lint/tests/lints/double-quotes/source.wdl | 2 +- wdl-lint/tests/lints/except/source.errors | 62 ++++- .../lints/input-not-sorted/source.errors | 8 + wdl-lint/tests/lints/line-width/source.errors | 24 +- .../lints/nonmatching-output/source.errors | 44 +++- .../tests/lints/nonmatching-output/source.wdl | 13 +- .../tests/lints/pascal-case/source.errors | 8 + .../runtime-keys-engine-keys/source.errors | 17 ++ .../lints/runtime-keys-engine-keys/source.wdl | 3 +- .../lints/runtime-keys-wdl-1.0/source.errors | 8 + .../lints/runtime-keys-wdl-1.1/source.errors | 8 + wdl-lint/tests/lints/snake-case/source.errors | 8 + wdl-lint/tests/lints/todo/source.errors | 16 ++ .../tests/lints/unknown_rule/source.errors | 12 +- 24 files changed, 397 insertions(+), 215 deletions(-) diff --git a/wdl-ast/src/validation.rs b/wdl-ast/src/validation.rs index 649162c6..1e52b8cd 100644 --- a/wdl-ast/src/validation.rs +++ b/wdl-ast/src/validation.rs @@ -1,5 +1,12 @@ //! Validator for WDL documents. +use std::collections::HashSet; + +use rowan::Direction; +use wdl_grammar::SyntaxElement; +use wdl_grammar::SyntaxKind; +use wdl_grammar::SyntaxNode; + use super::v1; use super::Comment; use super::Diagnostic; @@ -19,6 +26,9 @@ mod requirements; mod strings; mod version; +/// The prefix of `except` comments. +pub const EXCEPT_COMMENT_PREFIX: &str = "#@ except:"; + /// Represents a collection of validation diagnostics. /// /// Validation visitors receive a diagnostics collection during @@ -32,6 +42,62 @@ impl Diagnostics { pub fn add(&mut self, diagnostic: Diagnostic) { self.0.push(diagnostic); } + + /// Adds a diagnostic to the collection, unless the diagnostic is for an + /// element that has an exception for the given rule. + /// + /// If the diagnostic does not have a rule, the diagnostic is always added. + pub fn exceptable_add( + &mut self, + diagnostic: Diagnostic, + element: SyntaxElement, + exceptable_nodes: Option>, + ) { + if diagnostic.rule().is_none() { + self.add(diagnostic); + return; + } + + for node in element.ancestors().filter(|node| { + exceptable_nodes + .as_ref() + .map_or(true, |nodes| nodes.contains(&node.kind())) + }) { + if self + .exceptions_for(&node) + .contains(diagnostic.rule().expect("rule id")) + { + return; + } + } + + self.add(diagnostic); + } + + /// Gets the set of excepted rule ids for the given syntax node. + pub fn exceptions_for(&self, node: &SyntaxNode) -> HashSet { + let siblings = node + .siblings_with_tokens(Direction::Prev) + .skip(1) + .take_while(|s| s.kind() == SyntaxKind::Whitespace || s.kind() == SyntaxKind::Comment) + .filter_map(SyntaxElement::into_token); + + let mut set = HashSet::default(); + for sibling in siblings { + if sibling.kind() == SyntaxKind::Whitespace { + continue; + } + + if let Some(ids) = sibling.text().strip_prefix(EXCEPT_COMMENT_PREFIX) { + for id in ids.split(',') { + let id = id.trim(); + set.insert(id.to_string()); + } + } + } + + set + } } /// Implements an AST validator. diff --git a/wdl-lint/src/rules/blank_lines_between_elements.rs b/wdl-lint/src/rules/blank_lines_between_elements.rs index 3e84764f..be838800 100755 --- a/wdl-lint/src/rules/blank_lines_between_elements.rs +++ b/wdl-lint/src/rules/blank_lines_between_elements.rs @@ -23,6 +23,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::SyntaxNode; use wdl_ast::SyntaxToken; @@ -378,7 +379,11 @@ impl Visitor for BlankLinesBetweenElementsRule { // one `\n` is allowed. if self.state == State::InputSection || self.state == State::OutputSection { if count > 1 { - state.add(excess_blank_line(p.text_range().to_span())); + state.exceptable_add( + excess_blank_line(p.text_range().to_span()), + SyntaxElement::from(decl.syntax().clone()), + self.exceptable_nodes(), + ); } } else { let first = is_first_body(decl.syntax()); @@ -408,7 +413,11 @@ impl Visitor for BlankLinesBetweenElementsRule { // one `\n` is allowed. if self.state == State::InputSection || self.state == State::OutputSection { if count > 1 { - state.add(excess_blank_line(p.text_range().to_span())); + state.exceptable_add( + excess_blank_line(p.text_range().to_span()), + SyntaxElement::from(decl.syntax().clone()), + self.exceptable_nodes(), + ); } } else { let first = is_first_body(decl.syntax()); @@ -469,6 +478,11 @@ fn flag_all_blank_lines_within(syntax: &SyntaxNode, state: &mut Diagnostics) { let count = c.to_string().chars().filter(|c| *c == '\n').count(); if count > 1 { state.add(excess_blank_line(c.text_range().to_span())); + // state.exceptable_add( + // excess_blank_line(c.text_range().to_span()), + // SyntaxElement::from(syntax.clone()), + // BlankLinesBetweenElementsRule::exceptable_nodes(), + // ); } } }); diff --git a/wdl-lint/src/rules/deprecated_placeholder_option.rs b/wdl-lint/src/rules/deprecated_placeholder_option.rs index 7fb563f0..8a0fe5a1 100644 --- a/wdl-lint/src/rules/deprecated_placeholder_option.rs +++ b/wdl-lint/src/rules/deprecated_placeholder_option.rs @@ -90,6 +90,7 @@ impl Rule for DeprecatedPlaceholderOptionRule { Some(vec![ SyntaxKind::VersionStatementNode, SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, SyntaxKind::PlaceholderNode, ]) } diff --git a/wdl-lint/src/rules/nonmatching_output.rs b/wdl-lint/src/rules/nonmatching_output.rs index f81db9e3..4814fcd7 100755 --- a/wdl-lint/src/rules/nonmatching_output.rs +++ b/wdl-lint/src/rules/nonmatching_output.rs @@ -135,6 +135,7 @@ impl<'a> Rule for NonmatchingOutputRule<'a> { Some(vec![ SyntaxKind::VersionStatementNode, SyntaxKind::TaskDefinitionNode, + SyntaxKind::WorkflowDefinitionNode, ]) } } diff --git a/wdl-lint/src/rules/preamble_comments.rs b/wdl-lint/src/rules/preamble_comments.rs index 42f14d3f..61a52079 100644 --- a/wdl-lint/src/rules/preamble_comments.rs +++ b/wdl-lint/src/rules/preamble_comments.rs @@ -11,11 +11,11 @@ use wdl_ast::SyntaxKind; use wdl_ast::VersionStatement; use wdl_ast::VisitReason; use wdl_ast::Visitor; +use wdl_ast::EXCEPT_COMMENT_PREFIX; use crate::Rule; use crate::Tag; use crate::TagSet; -use crate::EXCEPT_COMMENT_PREFIX; /// The identifier for the preamble comments rule. const ID: &str = "PreambleComments"; diff --git a/wdl-lint/src/rules/unknown_rule.rs b/wdl-lint/src/rules/unknown_rule.rs index df3ac305..f59835f5 100644 --- a/wdl-lint/src/rules/unknown_rule.rs +++ b/wdl-lint/src/rules/unknown_rule.rs @@ -10,8 +10,8 @@ use wdl_ast::SupportedVersion; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; +use wdl_ast::EXCEPT_COMMENT_PREFIX; -use crate::visitor::EXCEPT_COMMENT_PREFIX; use crate::rules; use crate::Rule; use crate::Tag; @@ -76,8 +76,15 @@ impl Visitor for UnknownRule { offset += id.len() - trimmed.len(); // Check if the rule is known - if !rules().iter().map(|rule| rule.id()).any(|rule_id| rule_id == trimmed) { - state.add(unknown_rule(trimmed, Span::new(start + offset, trimmed.len()))); + if !rules() + .iter() + .map(|rule| rule.id()) + .any(|rule_id| rule_id == trimmed) + { + state.add(unknown_rule( + trimmed, + Span::new(start + offset, trimmed.len()), + )); } // Update the offset to account for the rule id and comma diff --git a/wdl-lint/src/visitor.rs b/wdl-lint/src/visitor.rs index dbb1100f..7ba3fc3e 100644 --- a/wdl-lint/src/visitor.rs +++ b/wdl-lint/src/visitor.rs @@ -6,15 +6,9 @@ use indexmap::IndexMap; use wdl_ast::v1; use wdl_ast::AstNode; use wdl_ast::Comment; -use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; -use wdl_ast::Direction; use wdl_ast::Document; -use wdl_ast::Span; use wdl_ast::SupportedVersion; -use wdl_ast::SyntaxElement; -use wdl_ast::SyntaxKind; -use wdl_ast::SyntaxNode; use wdl_ast::VersionStatement; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -23,16 +17,6 @@ use wdl_ast::Whitespace; use crate::rules; use crate::Rule; -/// The prefix of `except` comments. -pub const EXCEPT_COMMENT_PREFIX: &str = "#@ except:"; - -/// Creates an "unknown rule" diagnostic. -fn unknown_rule(id: &str, span: Span) -> Diagnostic { - Diagnostic::note(format!("unknown lint rule `{id}`")) - .with_label("cannot make an exception for this rule", span) - .with_fix("remove the rule from the exception list") -} - /// A visitor that runs linting rules. /// /// By default, the visitor runs all lint rules. @@ -51,9 +35,8 @@ fn unknown_rule(id: &str, span: Span) -> Diagnostic { pub struct LintVisitor { /// The map of rule name to rule. rules: IndexMap<&'static str, Box>, - /// A stack of exceptions; the first is the offset of the syntax element - /// with the comment and the second is the set of exceptions. - exceptions: Vec<(usize, HashSet)>, + /// The set of rule ids that are disabled for the current document. + document_exceptions: HashSet, } impl LintVisitor { @@ -61,89 +44,21 @@ impl LintVisitor { pub fn new(rules: impl IntoIterator>) -> Self { Self { rules: rules.into_iter().map(|r| (r.id(), r)).collect(), - exceptions: Default::default(), + document_exceptions: HashSet::default(), } } - /// Invokes a callback on each rule provided the rule is not currently - /// excepted. - fn each_enabled_rule( - &mut self, - state: &mut Diagnostics, - reason: VisitReason, - node: &SyntaxNode, - mut cb: F, - ) where + /// Invokes a callback on each rule + fn each_enabled_rule(&mut self, state: &mut Diagnostics, mut cb: F) + where F: FnMut(&mut Diagnostics, &mut dyn Rule), { - let start = node.text_range().start().into(); - - if reason == VisitReason::Enter { - let exceptions = self.exceptions_for(state, node); - if !exceptions.is_empty() { - self.exceptions.push((start, exceptions)); - } - } - for (id, rule) in &mut self.rules { - if self.exceptions.iter().any(|(_, set)| set.contains(*id)) { + if self.document_exceptions.contains(id.to_owned()) { continue; } - cb(state, rule.as_mut()); } - - if reason == VisitReason::Exit { - if let Some((prev, _)) = self.exceptions.last() { - if *prev == start { - self.exceptions.pop(); - } - } - } - } - - /// Gets the set of excepted rule ids for the given syntax node. - fn exceptions_for(&self, state: &mut Diagnostics, node: &SyntaxNode) -> HashSet { - let siblings = node - .siblings_with_tokens(Direction::Prev) - .skip(1) - .take_while(|s| s.kind() == SyntaxKind::Whitespace || s.kind() == SyntaxKind::Comment) - .filter_map(SyntaxElement::into_token); - - let mut set = HashSet::default(); - for sibling in siblings { - if sibling.kind() == SyntaxKind::Whitespace { - continue; - } - - if let Some(ids) = sibling.text().strip_prefix(EXCEPT_COMMENT_PREFIX) { - let start: usize = sibling.text_range().start().into(); - let mut offset = EXCEPT_COMMENT_PREFIX.len(); - for id in ids.split(',') { - // First trim the start so we can determine how much whitespace was removed - let trimmed_start = id.trim_start(); - // Next trim the end - let trimmed: &str = trimmed_start.trim_end(); - - if !self.rules.contains_key(trimmed) { - // Calculate the span based off the current offset and how much whitespace - // was trimmed - let span = Span::new( - start + offset + (id.len() - trimmed_start.len()), - trimmed.len(), - ); - - state.add(unknown_rule(trimmed, span)); - } else { - set.insert(trimmed.to_string()); - } - - offset += id.len() + 1 /* comma */; - } - } - } - - set } } @@ -151,7 +66,7 @@ impl Default for LintVisitor { fn default() -> Self { Self { rules: rules().into_iter().map(|r| (r.id(), r)).collect(), - exceptions: Default::default(), + document_exceptions: HashSet::default(), } } } @@ -168,39 +83,32 @@ impl Visitor for LintVisitor { ) { if reason == VisitReason::Enter { // Reset state for a new document - self.exceptions.clear(); + self.document_exceptions.clear(); } - self.each_enabled_rule( - state, - reason, - doc.version_statement() - .expect("should have version") - .syntax(), - |state, rule| { - rule.document(state, reason, doc, version); - }, + self.document_exceptions.extend( + state.exceptions_for( + doc.version_statement() + .expect("document should have version statement") + .syntax(), + ), ); + + self.each_enabled_rule(state, |state, rule| { + rule.document(state, reason, doc, version); + }); } fn whitespace(&mut self, state: &mut Self::State, whitespace: &Whitespace) { - for (id, rule) in &mut self.rules { - if self.exceptions.iter().any(|(_, set)| set.contains(*id)) { - continue; - } - + self.each_enabled_rule(state, |state, rule| { rule.whitespace(state, whitespace); - } + }); } fn comment(&mut self, state: &mut Self::State, comment: &Comment) { - for (id, rule) in &mut self.rules { - if self.exceptions.iter().any(|(_, set)| set.contains(*id)) { - continue; - } - + self.each_enabled_rule(state, |state, rule| { rule.comment(state, comment); - } + }); } fn version_statement( @@ -209,11 +117,9 @@ impl Visitor for LintVisitor { reason: VisitReason, stmt: &VersionStatement, ) { - // We call every rule here as we've already disabled the global rules based on - // the version statement - for (_, rule) in &mut self.rules { + self.each_enabled_rule(state, |state, rule| { rule.version_statement(state, reason, stmt); - } + }); } fn import_statement( @@ -222,7 +128,7 @@ impl Visitor for LintVisitor { reason: VisitReason, stmt: &v1::ImportStatement, ) { - self.each_enabled_rule(state, reason, stmt.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.import_statement(state, reason, stmt) }); } @@ -233,7 +139,7 @@ impl Visitor for LintVisitor { reason: VisitReason, def: &v1::StructDefinition, ) { - self.each_enabled_rule(state, reason, def.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.struct_definition(state, reason, def) }); } @@ -244,7 +150,7 @@ impl Visitor for LintVisitor { reason: VisitReason, task: &v1::TaskDefinition, ) { - self.each_enabled_rule(state, reason, task.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.task_definition(state, reason, task) }); } @@ -255,7 +161,7 @@ impl Visitor for LintVisitor { reason: VisitReason, workflow: &v1::WorkflowDefinition, ) { - self.each_enabled_rule(state, reason, workflow.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.workflow_definition(state, reason, workflow) }); } @@ -266,7 +172,7 @@ impl Visitor for LintVisitor { reason: VisitReason, section: &v1::InputSection, ) { - self.each_enabled_rule(state, reason, section.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.input_section(state, reason, section) }); } @@ -277,7 +183,7 @@ impl Visitor for LintVisitor { reason: VisitReason, section: &v1::OutputSection, ) { - self.each_enabled_rule(state, reason, section.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.output_section(state, reason, section) }); } @@ -288,19 +194,15 @@ impl Visitor for LintVisitor { reason: VisitReason, section: &v1::CommandSection, ) { - self.each_enabled_rule(state, reason, section.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.command_section(state, reason, section) }); } fn command_text(&mut self, state: &mut Self::State, text: &v1::CommandText) { - for (id, rule) in &mut self.rules { - if self.exceptions.iter().any(|(_, set)| set.contains(*id)) { - continue; - } - + self.each_enabled_rule(state, |state, rule| { rule.command_text(state, text); - } + }); } fn requirements_section( @@ -309,7 +211,7 @@ impl Visitor for LintVisitor { reason: VisitReason, section: &v1::RequirementsSection, ) { - self.each_enabled_rule(state, reason, section.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.requirements_section(state, reason, section) }); } @@ -320,7 +222,7 @@ impl Visitor for LintVisitor { reason: VisitReason, section: &v1::HintsSection, ) { - self.each_enabled_rule(state, reason, section.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.hints_section(state, reason, section) }); } @@ -331,7 +233,7 @@ impl Visitor for LintVisitor { reason: VisitReason, section: &v1::RuntimeSection, ) { - self.each_enabled_rule(state, reason, section.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.runtime_section(state, reason, section) }); } @@ -342,9 +244,7 @@ impl Visitor for LintVisitor { reason: VisitReason, item: &v1::RuntimeItem, ) { - self.each_enabled_rule(state, reason, item.syntax(), |state, rule| { - rule.runtime_item(state, reason, item) - }); + self.each_enabled_rule(state, |state, rule| rule.runtime_item(state, reason, item)); } fn metadata_section( @@ -353,7 +253,7 @@ impl Visitor for LintVisitor { reason: VisitReason, section: &v1::MetadataSection, ) { - self.each_enabled_rule(state, reason, section.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.metadata_section(state, reason, section) }); } @@ -364,7 +264,7 @@ impl Visitor for LintVisitor { reason: VisitReason, section: &v1::ParameterMetadataSection, ) { - self.each_enabled_rule(state, reason, section.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.parameter_metadata_section(state, reason, section) }); } @@ -375,7 +275,7 @@ impl Visitor for LintVisitor { reason: VisitReason, object: &v1::MetadataObject, ) { - self.each_enabled_rule(state, reason, object.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.metadata_object(state, reason, object) }); } @@ -386,7 +286,7 @@ impl Visitor for LintVisitor { reason: VisitReason, item: &v1::MetadataObjectItem, ) { - self.each_enabled_rule(state, reason, item.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.metadata_object_item(state, reason, item) }); } @@ -397,7 +297,7 @@ impl Visitor for LintVisitor { reason: VisitReason, item: &v1::MetadataArray, ) { - self.each_enabled_rule(state, reason, item.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.metadata_array(state, reason, item) }); } @@ -408,31 +308,21 @@ impl Visitor for LintVisitor { reason: VisitReason, decl: &v1::UnboundDecl, ) { - self.each_enabled_rule(state, reason, decl.syntax(), |state, rule| { - rule.unbound_decl(state, reason, decl) - }); + self.each_enabled_rule(state, |state, rule| rule.unbound_decl(state, reason, decl)); } fn bound_decl(&mut self, state: &mut Self::State, reason: VisitReason, decl: &v1::BoundDecl) { - self.each_enabled_rule(state, reason, decl.syntax(), |state, rule| { - rule.bound_decl(state, reason, decl) - }); + self.each_enabled_rule(state, |state, rule| rule.bound_decl(state, reason, decl)); } fn expr(&mut self, state: &mut Self::State, reason: VisitReason, expr: &v1::Expr) { - self.each_enabled_rule(state, reason, expr.syntax(), |state, rule| { - rule.expr(state, reason, expr) - }); + self.each_enabled_rule(state, |state, rule| rule.expr(state, reason, expr)); } fn string_text(&mut self, state: &mut Self::State, text: &v1::StringText) { - for (id, rule) in &mut self.rules { - if self.exceptions.iter().any(|(_, set)| set.contains(*id)) { - continue; - } - + self.each_enabled_rule(state, |state, rule| { rule.string_text(state, text); - } + }); } fn placeholder( @@ -441,7 +331,7 @@ impl Visitor for LintVisitor { reason: VisitReason, placeholder: &v1::Placeholder, ) { - self.each_enabled_rule(state, reason, placeholder.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.placeholder(state, reason, placeholder) }); } @@ -452,7 +342,7 @@ impl Visitor for LintVisitor { reason: VisitReason, stmt: &v1::ConditionalStatement, ) { - self.each_enabled_rule(state, reason, stmt.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.conditional_statement(state, reason, stmt) }); } @@ -463,7 +353,7 @@ impl Visitor for LintVisitor { reason: VisitReason, stmt: &v1::ScatterStatement, ) { - self.each_enabled_rule(state, reason, stmt.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.scatter_statement(state, reason, stmt) }); } @@ -474,7 +364,7 @@ impl Visitor for LintVisitor { reason: VisitReason, stmt: &v1::CallStatement, ) { - self.each_enabled_rule(state, reason, stmt.syntax(), |state, rule| { + self.each_enabled_rule(state, |state, rule| { rule.call_statement(state, reason, stmt) }); } diff --git a/wdl-lint/tests/lints/deprecated-object/source.errors b/wdl-lint/tests/lints/deprecated-object/source.errors index 71d8e572..25cb2c52 100644 --- a/wdl-lint/tests/lints/deprecated-object/source.errors +++ b/wdl-lint/tests/lints/deprecated-object/source.errors @@ -22,3 +22,11 @@ note[DeprecatedObject]: use of a deprecated `Object` type │ = fix: replace the `Object` with a `Map` or a `Struct` +note[DeprecatedObject]: use of a deprecated `Object` type + ┌─ tests/lints/deprecated-object/source.wdl:24:9 + │ +24 │ Object but_this_is_okay = object { + │ ^^^^^^ + │ + = fix: replace the `Object` with a `Map` or a `Struct` + diff --git a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors index da664f2d..eb244c7d 100644 --- a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors +++ b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors @@ -46,3 +46,51 @@ warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholde │ = fix: replace the `default` placeholder option with a call to the `select_first()` standard library function +warning[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder option + ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:47:32 + │ +47 │ String bad_sep_option = "~{sep="," numbers}" + │ ^^^^^^^ + │ + = fix: replace the `sep` placeholder option with a call to the `sep()` standard library function + +warning[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` placeholder option + ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:48:39 + │ +48 │ String bad_true_false_option = "~{true="--enable-foo" false="" allow_foo}" + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: replace the `true`/`false` placeholder option with an `if`/`else` expression + +warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholder option + ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:49:36 + │ +49 │ String bad_default_option = "~{default="false" bar}" + │ ^^^^^^^^^^^^^^^ + │ + = fix: replace the `default` placeholder option with a call to the `select_first()` standard library function + +warning[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder option + ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:52:28 + │ +52 │ python script.py ~{sep=" " numbers} + │ ^^^^^^^ + │ + = fix: replace the `sep` placeholder option with a call to the `sep()` standard library function + +warning[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` placeholder option + ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:53:27 + │ +53 │ example-command ~{true="--enable-foo" false="" allow_foo} + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: replace the `true`/`false` placeholder option with an `if`/`else` expression + +warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholder option + ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:54:27 + │ +54 │ another-command ~{default="foobar" bar} + │ ^^^^^^^^^^^^^^^^ + │ + = fix: replace the `default` placeholder option with a call to the `select_first()` standard library function + diff --git a/wdl-lint/tests/lints/double-quotes/source.errors b/wdl-lint/tests/lints/double-quotes/source.errors index 254bbb74..0e101cd8 100644 --- a/wdl-lint/tests/lints/double-quotes/source.errors +++ b/wdl-lint/tests/lints/double-quotes/source.errors @@ -26,3 +26,11 @@ warning[DoubleQuotes]: string defined with single quotes │ = fix: change the single quotes to double quotes +warning[DoubleQuotes]: string defined with single quotes + ┌─ tests/lints/double-quotes/source.wdl:21:9 + │ +21 │ 'this string is excepted' + │ ^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: change the single quotes to double quotes + diff --git a/wdl-lint/tests/lints/double-quotes/source.wdl b/wdl-lint/tests/lints/double-quotes/source.wdl index fd5f2132..06390b3e 100644 --- a/wdl-lint/tests/lints/double-quotes/source.wdl +++ b/wdl-lint/tests/lints/double-quotes/source.wdl @@ -16,8 +16,8 @@ workflow test { }" }' }!" + #@ except: DoubleQuotes String excepted = - #@ except: DoubleQuotes 'this string is excepted' output {} } diff --git a/wdl-lint/tests/lints/except/source.errors b/wdl-lint/tests/lints/except/source.errors index d11b294d..b4a1504c 100644 --- a/wdl-lint/tests/lints/except/source.errors +++ b/wdl-lint/tests/lints/except/source.errors @@ -1,4 +1,4 @@ -note: unknown lint rule `Unknown` +note[UnknownRule]: unknown lint rule `Unknown` ┌─ tests/lints/except/source.wdl:1:58 │ 1 │ #@ except: CommentWhitespace, Whitespace, EndingNewline, Unknown @@ -6,21 +6,29 @@ note: unknown lint rule `Unknown` │ = fix: remove the rule from the exception list -note[UnknownRule]: unknown lint rule `Unknown` - ┌─ tests/lints/except/source.wdl:1:58 +warning[PascalCase]: struct name `OK` is not PascalCase + ┌─ tests/lints/except/source.wdl:9:8 │ -1 │ #@ except: CommentWhitespace, Whitespace, EndingNewline, Unknown - │ ^^^^^^^ cannot make an exception for this rule +9 │ struct OK { # OK + │ ^^ this name must be PascalCase │ - = fix: remove the rule from the exception list + = fix: replace `OK` with `Ok` -note: unknown lint rule `AlsoUnknown` - ┌─ tests/lints/except/source.wdl:21:26 +warning[SnakeCase]: struct member name `AlsoOk` is not snake_case + ┌─ tests/lints/except/source.wdl:10:9 │ -21 │ #@ except: SnakeCase,AlsoUnknown - │ ^^^^^^^^^^^ cannot make an exception for this rule +10 │ Int AlsoOk # OK + │ ^^^^^^ this name must be snake_case │ - = fix: remove the rule from the exception list + = fix: replace `AlsoOk` with `also_ok` + +warning[SnakeCase]: struct member name `OKTOO` is not snake_case + ┌─ tests/lints/except/source.wdl:11:9 + │ +11 │ Int OKTOO # OK + │ ^^^^^ this name must be snake_case + │ + = fix: replace `OKTOO` with `oktoo` note[UnknownRule]: unknown lint rule `AlsoUnknown` ┌─ tests/lints/except/source.wdl:21:26 @@ -30,6 +38,14 @@ note[UnknownRule]: unknown lint rule `AlsoUnknown` │ = fix: remove the rule from the exception list +warning[SnakeCase]: struct member name `AlsoOk` is not snake_case + ┌─ tests/lints/except/source.wdl:22:9 + │ +22 │ Int AlsoOk # OK + │ ^^^^^^ this name must be snake_case + │ + = fix: replace `AlsoOk` with `also_ok` + warning[SnakeCase]: struct member name `NotOk` is not snake_case ┌─ tests/lints/except/source.wdl:23:9 │ @@ -38,6 +54,22 @@ warning[SnakeCase]: struct member name `NotOk` is not snake_case │ = fix: replace `NotOk` with `not_ok` +note[MissingMetas]: workflow `test` is missing a `meta` section + ┌─ tests/lints/except/source.wdl:27:10 + │ +27 │ workflow test { + │ ^^^^ this workflow is missing a `meta` section + │ + = fix: add a `meta` section to the workflow + +warning[MissingOutput]: workflow `test` is missing an output section + ┌─ tests/lints/except/source.wdl:27:10 + │ +27 │ workflow test { + │ ^^^^ this workflow is missing an output section + │ + = fix: add an output section to the workflow + warning[DoubleQuotes]: string defined with single quotes ┌─ tests/lints/except/source.wdl:28:18 │ @@ -46,3 +78,11 @@ warning[DoubleQuotes]: string defined with single quotes │ = fix: change the single quotes to double quotes +warning[DoubleQuotes]: string defined with single quotes + ┌─ tests/lints/except/source.wdl:30:9 + │ +30 │ 'good string' # OK + │ ^^^^^^^^^^^^^ + │ + = fix: change the single quotes to double quotes + diff --git a/wdl-lint/tests/lints/input-not-sorted/source.errors b/wdl-lint/tests/lints/input-not-sorted/source.errors index f621e853..b945faed 100644 --- a/wdl-lint/tests/lints/input-not-sorted/source.errors +++ b/wdl-lint/tests/lints/input-not-sorted/source.errors @@ -1,3 +1,11 @@ +note[MissingMetas]: struct `Mystruct` is missing both meta and parameter_meta sections + ┌─ tests/lints/input-not-sorted/source.wdl:7:8 + │ +7 │ struct Mystruct { + │ ^^^^^^^^ this struct is missing both meta and parameter_meta sections + │ + = fix: add meta and parameter_meta sections to the struct + warning[InputSorting]: input not sorted ┌─ tests/lints/input-not-sorted/source.wdl:40:5 │ diff --git a/wdl-lint/tests/lints/line-width/source.errors b/wdl-lint/tests/lints/line-width/source.errors index 9979a936..1af5dddf 100755 --- a/wdl-lint/tests/lints/line-width/source.errors +++ b/wdl-lint/tests/lints/line-width/source.errors @@ -15,17 +15,19 @@ note[LineWidth]: line exceeds maximum width of 90 = fix: split the line into multiple lines note[LineWidth]: line exceeds maximum width of 90 - ┌─ tests/lints/line-width/source.wdl:31:1 - │ -31 │ ╭ command <<< -32 │ │ bin / -33 │ │ this is going to be a really long line that is not going to trip up our maximum line lint because it is excepted / -34 │ │ some other / - · │ -37 │ │ options -38 │ │ >>> - │ ╰───────^ - │ + ┌─ tests/lints/line-width/source.wdl:33:1 + │ +33 │ this is going to be a really long line that is not going to trip up our maximum line lint because it is excepted / + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: split the line into multiple lines + +note[LineWidth]: line exceeds maximum width of 90 + ┌─ tests/lints/line-width/source.wdl:35:1 + │ +35 │ this line is also going to be very very very long but it will also not trip up our maximum line line because it is excepted / + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ = fix: split the line into multiple lines note[LineWidth]: line exceeds maximum width of 90 diff --git a/wdl-lint/tests/lints/nonmatching-output/source.errors b/wdl-lint/tests/lints/nonmatching-output/source.errors index ed70974c..774cfb87 100644 --- a/wdl-lint/tests/lints/nonmatching-output/source.errors +++ b/wdl-lint/tests/lints/nonmatching-output/source.errors @@ -71,26 +71,58 @@ warning[NonmatchingOutput]: output `v` is missing from `meta.outputs` section in │ = fix: add a description of output `v` to documentation in `meta.outputs` +warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `garply` but is not a declared `output` + ┌─ tests/lints/nonmatching-output/source.wdl:103:13 + │ +103 │ v: "v" + │ ^^^^^^ + │ + = fix: ensure the output exists or remove the `v` key from `meta.outputs` + +warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `garply2` but is not a declared `output` + ┌─ tests/lints/nonmatching-output/source.wdl:120:13 + │ +120 │ v: "v" + │ ^^^^^^ + │ + = fix: ensure the output exists or remove the `v` key from `meta.outputs` + +warning[NonmatchingOutput]: output `v` is missing from `meta.outputs` section in task `waldo` + ┌─ tests/lints/nonmatching-output/source.wdl:143:9 + │ +143 │ String v = "!" + │ ^^^^^^^^^^^^^^ + │ + = fix: add a description of output `v` to documentation in `meta.outputs` + +warning[NonmatchingOutput]: output `v` is missing from `meta.outputs` section in task `waldo2` + ┌─ tests/lints/nonmatching-output/source.wdl:160:9 + │ +160 │ String v = "!" + │ ^^^^^^^^^^^^^^ + │ + = fix: add a description of output `v` to documentation in `meta.outputs` + warning[NonmatchingOutput]: `s` appears in `outputs` section of the task `quuux` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:175:13 + ┌─ tests/lints/nonmatching-output/source.wdl:168:13 │ -175 │ s: "s", +168 │ s: "s", │ ^^^^^^ │ = fix: ensure the output exists or remove the `s` key from `meta.outputs` warning[NonmatchingOutput]: `t` appears in `outputs` section of the task `quuux` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:176:13 + ┌─ tests/lints/nonmatching-output/source.wdl:169:13 │ -176 │ t: "t", +169 │ t: "t", │ ^^^^^^ │ = fix: ensure the output exists or remove the `t` key from `meta.outputs` warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `quuux` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:177:13 + ┌─ tests/lints/nonmatching-output/source.wdl:170:13 │ -177 │ v: "v" +170 │ v: "v" │ ^^^^^^ │ = fix: ensure the output exists or remove the `v` key from `meta.outputs` diff --git a/wdl-lint/tests/lints/nonmatching-output/source.wdl b/wdl-lint/tests/lints/nonmatching-output/source.wdl index 800e4d21..467642ae 100644 --- a/wdl-lint/tests/lints/nonmatching-output/source.wdl +++ b/wdl-lint/tests/lints/nonmatching-output/source.wdl @@ -111,15 +111,12 @@ task garply { } # This task should not trigger a warning due to `#@ except`. +#@ except: NonmatchingOutput task garply2 { - # except works here - #@ except: NonmatchingOutput meta { - # except doesn't work here. In fact, this triggers a missing "outputs" warning. outputs: { s: "s", t: "t", - # This also works v: "v" } } @@ -130,6 +127,7 @@ task garply2 { } } +#@ except: NonmatchingOutput # This task should not trigger a warning due to `#@ except`. task waldo { meta { @@ -139,17 +137,15 @@ task waldo { } } command <<< >>> - # except works here output { String s = "hello" String t = "world" - # Also here - #@ except: NonmatchingOutput String v = "!" } } # This should not trigger any warnings. +#@ except: NonmatchingOutput task waldo2 { meta { outputs: { @@ -158,12 +154,9 @@ task waldo2 { } } command <<< >>> - # except works here - #@ except: NonmatchingOutput output { String s = "hello" String t = "world" - # Also here String v = "!" } } diff --git a/wdl-lint/tests/lints/pascal-case/source.errors b/wdl-lint/tests/lints/pascal-case/source.errors index 6df215f9..9bd80c1f 100644 --- a/wdl-lint/tests/lints/pascal-case/source.errors +++ b/wdl-lint/tests/lints/pascal-case/source.errors @@ -22,3 +22,11 @@ warning[PascalCase]: struct name `This_Is_Bad_Too` is not PascalCase │ = fix: replace `This_Is_Bad_Too` with `ThisIsBadToo` +warning[PascalCase]: struct name `excepted_name` is not PascalCase + ┌─ tests/lints/pascal-case/source.wdl:22:8 + │ +22 │ struct excepted_name { + │ ^^^^^^^^^^^^^ this name must be PascalCase + │ + = fix: replace `excepted_name` with `ExceptedName` + diff --git a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors index e165cbc9..6ca3a47d 100644 --- a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors @@ -15,3 +15,20 @@ warning[RuntimeSectionKeys]: the following runtime keys are not reserved in the │ = fix: if reserved key names were intended, correct the spelling of each key; otherwise, remove the `cromwell` and `miniwdl` keys +warning[RuntimeSectionKeys]: the following runtime keys are not reserved in the WDL v1.1 specification: `cromwell` and `miniwdl`; therefore, their inclusion in the `runtime` section is deprecated + ┌─ tests/lints/runtime-keys-engine-keys/source.wdl:27:5 + │ +27 │ ╭ runtime { +28 │ │ container: "ubuntu" +29 │ │ cpu: 1 +30 │ │ disks: [] + · │ +35 │ │ cromwell: {} + │ │ -------- the `cromwell` key should be removed +36 │ │ miniwdl: {} + │ │ ------- the `miniwdl` key should be removed +37 │ │ } + │ ╰─────^ + │ + = fix: if reserved key names were intended, correct the spelling of each key; otherwise, remove the `cromwell` and `miniwdl` keys + diff --git a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.wdl b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.wdl index 860ee8ae..c1c2184b 100644 --- a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.wdl +++ b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.wdl @@ -23,6 +23,7 @@ task a_task_with_excepted_engine_hints { meta {} command <<<>>> output {} + #@ except: RuntimeSectionKeys runtime { container: "ubuntu" cpu: 1 @@ -31,9 +32,7 @@ task a_task_with_excepted_engine_hints { maxRetries: 1 memory: "1 GiB" returnCodes: "*" - #@ except: RuntimeSectionKeys cromwell: {} - #@ except: RuntimeSectionKeys miniwdl: {} } } diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors b/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors index a73b08b0..2746caee 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors @@ -6,6 +6,14 @@ note[RuntimeSectionKeys]: the following runtime keys are recommended by the WDL │ = fix: include entries for the `docker` and `memory` keys in the `runtime` section +note[RuntimeSectionKeys]: the following runtime keys are recommended by the WDL v1.0 specification: `docker` and `memory` + ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:18:5 + │ +18 │ runtime {} # Errors should be ignored + │ ^^^^^^^^^^ + │ + = fix: include entries for the `docker` and `memory` keys in the `runtime` section + note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.0 specification: `memory` ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:25:5 │ diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors b/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors index 5a40db35..dc12f57e 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors @@ -6,6 +6,14 @@ note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1 │ = fix: include an entry for the `container` key in the `runtime` section +note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.1 specification: `container` + ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:19:5 + │ +19 │ runtime {} # No errors should show. + │ ^^^^^^^^^^ + │ + = fix: include an entry for the `container` key in the `runtime` section + warning[RuntimeSectionKeys]: the following runtime key is not reserved in the WDL v1.1 specification: `foo`; therefore, its inclusion in the `runtime` section is deprecated ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:42:5 │ diff --git a/wdl-lint/tests/lints/snake-case/source.errors b/wdl-lint/tests/lints/snake-case/source.errors index 04858c21..83ba4ae3 100644 --- a/wdl-lint/tests/lints/snake-case/source.errors +++ b/wdl-lint/tests/lints/snake-case/source.errors @@ -46,3 +46,11 @@ warning[SnakeCase]: struct member name `bAdFiElD` is not snake_case │ = fix: replace `bAdFiElD` with `b_ad_fi_el_d` +warning[SnakeCase]: struct member name `OK` is not snake_case + ┌─ tests/lints/snake-case/source.wdl:62:12 + │ +62 │ String OK + │ ^^ this name must be snake_case + │ + = fix: replace `OK` with `ok` + diff --git a/wdl-lint/tests/lints/todo/source.errors b/wdl-lint/tests/lints/todo/source.errors index 5e98e412..8d71b7a5 100755 --- a/wdl-lint/tests/lints/todo/source.errors +++ b/wdl-lint/tests/lints/todo/source.errors @@ -22,3 +22,19 @@ note[Todo]: remaining `TODO` item found │ = fix: implement this todo item and remove the `TODO` statement +note[Todo]: remaining `TODO` item found + ┌─ tests/lints/todo/source.wdl:14:11 + │ +14 │ # TODO: this should NOT be flagged either + │ ^^^^ + │ + = fix: implement this todo item and remove the `TODO` statement + +note[Todo]: remaining `TODO` item found + ┌─ tests/lints/todo/source.wdl:21:7 + │ +21 │ # TODO: This should NOT be flagged as well. + │ ^^^^ + │ + = fix: implement this todo item and remove the `TODO` statement + diff --git a/wdl-lint/tests/lints/unknown_rule/source.errors b/wdl-lint/tests/lints/unknown_rule/source.errors index 0cf0b0a3..28f64144 100644 --- a/wdl-lint/tests/lints/unknown_rule/source.errors +++ b/wdl-lint/tests/lints/unknown_rule/source.errors @@ -1,4 +1,4 @@ -note: unknown lint rule `ThisIsNotARealRule` +note[UnknownRule]: unknown lint rule `ThisIsNotARealRule` ┌─ tests/lints/unknown_rule/source.wdl:3:12 │ 3 │ #@ except: ThisIsNotARealRule, DescriptionMissing @@ -6,11 +6,11 @@ note: unknown lint rule `ThisIsNotARealRule` │ = fix: remove the rule from the exception list -note[UnknownRule]: unknown lint rule `ThisIsNotARealRule` - ┌─ tests/lints/unknown_rule/source.wdl:3:12 +note[DescriptionMissing]: workflow `test` is missing a description key + ┌─ tests/lints/unknown_rule/source.wdl:5:3 │ -3 │ #@ except: ThisIsNotARealRule, DescriptionMissing - │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule +5 │ meta {} + │ ^^^^ │ - = fix: remove the rule from the exception list + = fix: add a `description` key to this meta section From 5df7b5433172c4bf8d46492e795966fc9429d0fb Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 10 Sep 2024 14:13:45 -0400 Subject: [PATCH 05/30] [WIP] --- wdl-ast/src/validation.rs | 2 +- .../src/rules/blank_lines_between_elements.rs | 82 +++++++++++-------- wdl-lint/src/rules/call_input_spacing.rs | 29 +++++-- .../src/rules/command_mixed_indentation.rs | 15 ++-- wdl-lint/src/rules/comment_whitespace.rs | 44 ++++++---- wdl-lint/src/rules/container_value.rs | 55 ++++++++++--- wdl-lint/src/rules/deprecated_object.rs | 14 +++- .../rules/deprecated_placeholder_option.rs | 17 ++-- wdl-lint/src/rules/description_missing.rs | 23 ++++-- wdl-lint/src/rules/disallowed_input_name.rs | 34 ++++++-- wdl-lint/src/rules/disallowed_output_name.rs | 34 ++++++-- wdl-lint/src/rules/double_quotes.rs | 8 +- wdl-lint/src/rules/ending_newline.rs | 9 ++ .../lints/deprecated-object/source.errors | 8 -- .../source.errors | 48 ----------- wdl-lint/tests/lints/except/source.errors | 8 -- 16 files changed, 265 insertions(+), 165 deletions(-) diff --git a/wdl-ast/src/validation.rs b/wdl-ast/src/validation.rs index 1e52b8cd..b870e6c0 100644 --- a/wdl-ast/src/validation.rs +++ b/wdl-ast/src/validation.rs @@ -51,7 +51,7 @@ impl Diagnostics { &mut self, diagnostic: Diagnostic, element: SyntaxElement, - exceptable_nodes: Option>, + exceptable_nodes: &Option>, ) { if diagnostic.rule().is_none() { self.add(diagnostic); diff --git a/wdl-lint/src/rules/blank_lines_between_elements.rs b/wdl-lint/src/rules/blank_lines_between_elements.rs index be838800..c22ea92f 100755 --- a/wdl-lint/src/rules/blank_lines_between_elements.rs +++ b/wdl-lint/src/rules/blank_lines_between_elements.rs @@ -153,7 +153,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(task.syntax()); let actual_start = skip_preceding_comments(task.syntax()); - check_prior_spacing(&actual_start, state, true, first); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); } fn workflow_definition( @@ -168,7 +168,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(workflow.syntax()); let actual_start = skip_preceding_comments(workflow.syntax()); - check_prior_spacing(&actual_start, state, true, first); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); } fn metadata_section( @@ -186,8 +186,8 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(section.syntax()); let actual_start = skip_preceding_comments(section.syntax()); - check_prior_spacing(&actual_start, state, true, first); - flag_all_blank_lines_within(section.syntax(), state); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); + flag_all_blank_lines_within(section.syntax(), state, &self.exceptable_nodes()); } fn parameter_metadata_section( @@ -205,8 +205,8 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(section.syntax()); let actual_start = skip_preceding_comments(section.syntax()); - check_prior_spacing(&actual_start, state, true, first); - flag_all_blank_lines_within(section.syntax(), state); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); + flag_all_blank_lines_within(section.syntax(), state, &self.exceptable_nodes()); } fn input_section( @@ -224,7 +224,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(section.syntax()); let actual_start = skip_preceding_comments(section.syntax()); - check_prior_spacing(&actual_start, state, true, first); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); } fn command_section( @@ -239,7 +239,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(section.syntax()); let actual_start = skip_preceding_comments(section.syntax()); - check_prior_spacing(&actual_start, state, true, first); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); } fn output_section( @@ -256,7 +256,7 @@ impl Visitor for BlankLinesBetweenElementsRule { } let first = is_first_element(section.syntax()); let actual_start = skip_preceding_comments(section.syntax()); - check_prior_spacing(&actual_start, state, true, first); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); } fn runtime_section( @@ -272,10 +272,10 @@ impl Visitor for BlankLinesBetweenElementsRule { self.state = State::RuntimeSection; } - flag_all_blank_lines_within(section.syntax(), state); + flag_all_blank_lines_within(section.syntax(), state, &self.exceptable_nodes()); let first = is_first_element(section.syntax()); let actual_start = skip_preceding_comments(section.syntax()); - check_prior_spacing(&actual_start, state, true, first); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); } // call statement internal spacing is handled by the CallInputSpacing rule @@ -296,7 +296,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let prev = skip_preceding_comments(stmt.syntax()); if first { - check_prior_spacing(&prev, state, true, false); + check_prior_spacing(&prev, state, true, false, &self.exceptable_nodes()); } } @@ -315,7 +315,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let prev = skip_preceding_comments(stmt.syntax()); if first { - check_prior_spacing(&prev, state, true, false); + check_prior_spacing(&prev, state, true, false, &self.exceptable_nodes()); } } @@ -331,7 +331,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(def.syntax()); let actual_start = skip_preceding_comments(def.syntax()); - check_prior_spacing(&actual_start, state, true, first); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); } fn requirements_section( @@ -346,8 +346,8 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(section.syntax()); let actual_start = skip_preceding_comments(section.syntax()); - check_prior_spacing(&actual_start, state, true, first); - flag_all_blank_lines_within(section.syntax(), state); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); + flag_all_blank_lines_within(section.syntax(), state, &self.exceptable_nodes()); } fn hints_section( @@ -362,8 +362,8 @@ impl Visitor for BlankLinesBetweenElementsRule { let first = is_first_element(section.syntax()); let actual_start = skip_preceding_comments(section.syntax()); - check_prior_spacing(&actual_start, state, true, first); - flag_all_blank_lines_within(section.syntax(), state); + check_prior_spacing(&actual_start, state, true, first, &self.exceptable_nodes()); + flag_all_blank_lines_within(section.syntax(), state, &self.exceptable_nodes()); } fn unbound_decl(&mut self, state: &mut Self::State, reason: VisitReason, decl: &UnboundDecl) { @@ -382,7 +382,7 @@ impl Visitor for BlankLinesBetweenElementsRule { state.exceptable_add( excess_blank_line(p.text_range().to_span()), SyntaxElement::from(decl.syntax().clone()), - self.exceptable_nodes(), + &self.exceptable_nodes(), ); } } else { @@ -391,7 +391,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let prev = skip_preceding_comments(decl.syntax()); if first { - check_prior_spacing(&prev, state, true, false); + check_prior_spacing(&prev, state, true, false, &self.exceptable_nodes()); } } } @@ -416,7 +416,7 @@ impl Visitor for BlankLinesBetweenElementsRule { state.exceptable_add( excess_blank_line(p.text_range().to_span()), SyntaxElement::from(decl.syntax().clone()), - self.exceptable_nodes(), + &self.exceptable_nodes(), ); } } else { @@ -425,7 +425,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let prev = skip_preceding_comments(decl.syntax()); if first { - check_prior_spacing(&prev, state, true, false); + check_prior_spacing(&prev, state, true, false, &self.exceptable_nodes()); } } } @@ -447,7 +447,7 @@ impl Visitor for BlankLinesBetweenElementsRule { let prev = skip_preceding_comments(stmt.syntax()); if first { - check_prior_spacing(&prev, state, true, false); + check_prior_spacing(&prev, state, true, false, &self.exceptable_nodes()); } } } @@ -472,17 +472,20 @@ fn is_first_element(syntax: &SyntaxNode) -> bool { } /// Some sections do not allow blank lines, so detect and flag them. -fn flag_all_blank_lines_within(syntax: &SyntaxNode, state: &mut Diagnostics) { +fn flag_all_blank_lines_within( + syntax: &SyntaxNode, + state: &mut Diagnostics, + exceptable_nodes: &Option>, +) { syntax.descendants_with_tokens().for_each(|c| { if c.kind() == SyntaxKind::Whitespace { let count = c.to_string().chars().filter(|c| *c == '\n').count(); if count > 1 { - state.add(excess_blank_line(c.text_range().to_span())); - // state.exceptable_add( - // excess_blank_line(c.text_range().to_span()), - // SyntaxElement::from(syntax.clone()), - // BlankLinesBetweenElementsRule::exceptable_nodes(), - // ); + state.exceptable_add( + excess_blank_line(c.text_range().to_span()), + SyntaxElement::from(syntax.clone()), + exceptable_nodes, + ); } } }); @@ -497,6 +500,7 @@ fn check_prior_spacing( state: &mut Diagnostics, element_spacing_required: bool, first: bool, + exceptable_nodes: &Option>, ) { if let Some(prior) = syntax.prev_sibling_or_token() { match prior.kind() { @@ -505,10 +509,18 @@ fn check_prior_spacing( if first || !element_spacing_required { // first element cannot have a blank line before it if count > 1 { - state.add(excess_blank_line(prior.text_range().to_span())); + state.exceptable_add( + excess_blank_line(prior.text_range().to_span()), + SyntaxElement::from(syntax.clone()), + exceptable_nodes, + ); } } else if count < 2 && element_spacing_required { - state.add(missing_blank_line(syntax.text_range().to_span())); + state.exceptable_add( + missing_blank_line(syntax.text_range().to_span()), + SyntaxElement::from(syntax.clone()), + exceptable_nodes, + ); } } // Something other than whitespace precedes @@ -516,7 +528,11 @@ fn check_prior_spacing( // If we require between element spacing and are not the first element, // we're missing a blank line. if element_spacing_required && !first { - state.add(missing_blank_line(syntax.text_range().to_span())); + state.exceptable_add( + missing_blank_line(syntax.text_range().to_span()), + SyntaxElement::from(syntax.clone()), + exceptable_nodes, + ); } } } diff --git a/wdl-lint/src/rules/call_input_spacing.rs b/wdl-lint/src/rules/call_input_spacing.rs index f712893f..e54cc3ff 100644 --- a/wdl-lint/src/rules/call_input_spacing.rs +++ b/wdl-lint/src/rules/call_input_spacing.rs @@ -7,6 +7,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -130,14 +131,18 @@ impl Visitor for CallInputSpacingRule { if let Some(whitespace) = input_keyword.prev_sibling_or_token() { if whitespace.kind() != SyntaxKind::Whitespace { // If there is no whitespace before the input keyword - state.add(call_input_keyword_spacing( - input_keyword.text_range().to_span(), - )); + state.exceptable_add( + call_input_keyword_spacing(input_keyword.text_range().to_span()), + SyntaxElement::from(call.syntax().clone()), + &self.exceptable_nodes(), + ); } else if !whitespace.as_token().unwrap().text().eq(" ") { // If there is anything other than one space before the input keyword - state.add(call_input_incorrect_spacing( - whitespace.text_range().to_span(), - )); + state.exceptable_add( + call_input_incorrect_spacing(whitespace.text_range().to_span()), + SyntaxElement::from(call.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -155,7 +160,11 @@ impl Visitor for CallInputSpacingRule { ) { (SyntaxKind::Whitespace, SyntaxKind::Whitespace) => {} _ => { - state.add(call_input_assignment(assign.text_range().to_span())); + state.exceptable_add( + call_input_assignment(assign.text_range().to_span()), + SyntaxElement::from(call.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -173,7 +182,11 @@ impl Visitor for CallInputSpacingRule { } SyntaxKind::CallInputItemNode => { if newline_seen == 0 && inputs > 1 { - state.add(call_input_missing_newline(c.text_range().to_span())); + state.exceptable_add( + call_input_missing_newline(c.text_range().to_span()), + SyntaxElement::from(call.syntax().clone()), + &self.exceptable_nodes(), + ); } newline_seen = 0; } diff --git a/wdl-lint/src/rules/command_mixed_indentation.rs b/wdl-lint/src/rules/command_mixed_indentation.rs index 3f294c89..182a50de 100644 --- a/wdl-lint/src/rules/command_mixed_indentation.rs +++ b/wdl-lint/src/rules/command_mixed_indentation.rs @@ -12,6 +12,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -179,11 +180,15 @@ impl Visitor for CommandSectionMixedIndentationRule { let command_keyword = support::token(section.syntax(), SyntaxKind::CommandKeyword) .expect("should have a command keyword token"); - state.add(mixed_indentation( - command_keyword.text_range().to_span(), - span, - kind.expect("an indentation kind should be present"), - )); + state.exceptable_add( + mixed_indentation( + command_keyword.text_range().to_span(), + span, + kind.expect("an indentation kind should be present"), + ), + SyntaxElement::from(section.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/comment_whitespace.rs b/wdl-lint/src/rules/comment_whitespace.rs index bbbb6041..9ba13a91 100644 --- a/wdl-lint/src/rules/comment_whitespace.rs +++ b/wdl-lint/src/rules/comment_whitespace.rs @@ -9,6 +9,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::SyntaxNode; use wdl_ast::VisitReason; @@ -116,7 +117,11 @@ impl Visitor for CommentWhitespaceRule { if let Some(prior) = comment.syntax().prev_sibling_or_token() { if prior.kind() != SyntaxKind::Whitespace || prior.to_string() != " " { // Report a diagnostic if there are not two spaces before the comment delimiter - state.add(inline_preceding_whitespace(comment.span())) + state.exceptable_add( + inline_preceding_whitespace(comment.span()), + SyntaxElement::from(comment.syntax().clone()), + &self.exceptable_nodes(), + ); } } } else { @@ -137,16 +142,24 @@ impl Visitor for CommentWhitespaceRule { if this_indentation != expected_indentation { // Report a diagnostic if the comment is not indented properly match this_indentation.len().cmp(&expected_indentation.len()) { - Ordering::Greater => state.add(excess_indentation( - comment.span(), - expected_indentation.len() / INDENT.len(), - this_indentation.len() / INDENT.len(), - )), - Ordering::Less => state.add(insufficient_indentation( - comment.span(), - expected_indentation.len() / INDENT.len(), - this_indentation.len() / INDENT.len(), - )), + Ordering::Greater => state.exceptable_add( + excess_indentation( + comment.span(), + expected_indentation.len() / INDENT.len(), + this_indentation.len() / INDENT.len(), + ), + SyntaxElement::from(comment.syntax().clone()), + &self.exceptable_nodes(), + ), + Ordering::Less => state.exceptable_add( + insufficient_indentation( + comment.span(), + expected_indentation.len() / INDENT.len(), + this_indentation.len() / INDENT.len(), + ), + SyntaxElement::from(comment.syntax().clone()), + &self.exceptable_nodes(), + ), Ordering::Equal => {} } } @@ -177,10 +190,11 @@ impl Visitor for CommentWhitespaceRule { if comment_chars.skip(n_whitespace).count() > 0 && ((n_whitespace != 1 && !preamble) || (preamble && n_whitespace == 0)) { - state.add(following_whitespace(Span::new( - comment.span().start(), - n_delimiter, - ))); + state.exceptable_add( + following_whitespace(Span::new(comment.span().start(), n_delimiter)), + SyntaxElement::from(comment.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/container_value.rs b/wdl-lint/src/rules/container_value.rs index 8be1952f..9d190d42 100644 --- a/wdl-lint/src/rules/container_value.rs +++ b/wdl-lint/src/rules/container_value.rs @@ -10,11 +10,13 @@ use wdl_ast::v1::common::container::value::Value; use wdl_ast::v1::common::container::Kind; use wdl_ast::v1::RequirementsSection; use wdl_ast::v1::RuntimeSection; +use wdl_ast::AstNode; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -157,7 +159,12 @@ impl Visitor for ContainerValue { if let Some(container) = section.container() { if let Ok(value) = container.value() { - check_container_value(state, value); + check_container_value( + state, + value, + SyntaxElement::from(section.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -174,7 +181,12 @@ impl Visitor for ContainerValue { if let Some(container) = section.container() { if let Ok(value) = container.value() { - check_container_value(state, value); + check_container_value( + state, + value, + SyntaxElement::from(section.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -182,22 +194,37 @@ impl Visitor for ContainerValue { /// Examines the value of the `container` item in both the `runtime` and /// `requirements` sections. -fn check_container_value(state: &mut Diagnostics, value: Value) { +fn check_container_value( + state: &mut Diagnostics, + value: Value, + syntax: SyntaxElement, + exceptable_nodes: &Option>, +) { if let Kind::Array(array) = value.kind() { if array.is_empty() { - state.add(empty_array(span_of(value.expr()))) + state.exceptable_add( + empty_array(span_of(value.expr())), + syntax.clone(), + exceptable_nodes, + ); } else if array.len() == 1 { // SAFETY: we just checked to ensure that exactly one element exists in the // vec, so this will always unwrap. let uri = array.iter().next().unwrap(); - state.add(array_to_string_literal(span_of(uri.literal_string()))); + state.exceptable_add( + array_to_string_literal(span_of(uri.literal_string())), + syntax.clone(), + exceptable_nodes, + ); } else { let mut anys = array.iter().filter(|uri| uri.kind().is_any()).peekable(); if anys.peek().is_some() { - state.add(array_containing_anys( - anys.map(|any| span_of(any.literal_string())), - )); + state.exceptable_add( + array_containing_anys(anys.map(|any| span_of(any.literal_string()))), + syntax.clone(), + exceptable_nodes, + ); } } } @@ -205,9 +232,17 @@ fn check_container_value(state: &mut Diagnostics, value: Value) { for uri in value.uris() { if let Some(entry) = uri.kind().as_entry() { if entry.tag().is_none() { - state.add(missing_tag(span_of(uri.literal_string()))); + state.exceptable_add( + missing_tag(span_of(uri.literal_string())), + syntax.clone(), + exceptable_nodes, + ); } else if !entry.immutable() { - state.add(mutable_tag(span_of(uri.literal_string()))); + state.exceptable_add( + mutable_tag(span_of(uri.literal_string())), + syntax.clone(), + exceptable_nodes, + ); } } } diff --git a/wdl-lint/src/rules/deprecated_object.rs b/wdl-lint/src/rules/deprecated_object.rs index c4a7a4e6..dec4b8eb 100644 --- a/wdl-lint/src/rules/deprecated_object.rs +++ b/wdl-lint/src/rules/deprecated_object.rs @@ -2,11 +2,13 @@ use wdl_ast::span_of; use wdl_ast::v1::Type; +use wdl_ast::AstNode; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -94,7 +96,11 @@ impl Visitor for DeprecatedObjectRule { } if let Type::Object(ty) = decl.ty() { - state.add(deprecated_object_use(span_of(&ty))) + state.exceptable_add( + deprecated_object_use(span_of(&ty)), + SyntaxElement::from(decl.syntax().clone()), + &self.exceptable_nodes(), + ) } } @@ -109,7 +115,11 @@ impl Visitor for DeprecatedObjectRule { } if let Type::Object(ty) = decl.ty() { - state.add(deprecated_object_use(span_of(&ty))) + state.exceptable_add( + deprecated_object_use(span_of(&ty)), + SyntaxElement::from(decl.syntax().clone()), + &self.exceptable_nodes(), + ) } } } diff --git a/wdl-lint/src/rules/deprecated_placeholder_option.rs b/wdl-lint/src/rules/deprecated_placeholder_option.rs index 8a0fe5a1..2f821d74 100644 --- a/wdl-lint/src/rules/deprecated_placeholder_option.rs +++ b/wdl-lint/src/rules/deprecated_placeholder_option.rs @@ -4,11 +4,13 @@ use wdl_ast::span_of; use wdl_ast::v1::Placeholder; use wdl_ast::v1::PlaceholderOption; use wdl_ast::version::V1; +use wdl_ast::AstNode; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -141,17 +143,22 @@ impl Visitor for DeprecatedPlaceholderOptionRule { }; if let Some(option) = placeholder.option() { - match option { + let diagnostic = match option { PlaceholderOption::Sep(option) => { - state.add(deprecated_sep_placeholder_option(span_of(&option))); + deprecated_sep_placeholder_option(span_of(&option)) } PlaceholderOption::Default(option) => { - state.add(deprecated_default_placeholder_option(span_of(&option))); + deprecated_default_placeholder_option(span_of(&option)) } PlaceholderOption::TrueFalse(option) => { - state.add(deprecated_true_false_placeholder_option(span_of(&option))) + deprecated_true_false_placeholder_option(span_of(&option)) } - } + }; + state.exceptable_add( + diagnostic, + SyntaxElement::from(placeholder.syntax().clone()), + &self.exceptable_nodes(), + ) } } } diff --git a/wdl-lint/src/rules/description_missing.rs b/wdl-lint/src/rules/description_missing.rs index bdd1e2e4..cb9e331b 100644 --- a/wdl-lint/src/rules/description_missing.rs +++ b/wdl-lint/src/rules/description_missing.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -126,15 +127,19 @@ impl Visitor for DescriptionMissingRule { .find(|entry| entry.name().syntax().to_string() == "description"); if description.is_none() { - state.add(description_missing( - section - .syntax() - .first_token() - .unwrap() - .text_range() - .to_span(), - section.parent(), - )); + state.exceptable_add( + description_missing( + section + .syntax() + .first_token() + .unwrap() + .text_range() + .to_span(), + section.parent(), + ), + SyntaxElement::from(section.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/disallowed_input_name.rs b/wdl-lint/src/rules/disallowed_input_name.rs index fbffe883..111dafcc 100755 --- a/wdl-lint/src/rules/disallowed_input_name.rs +++ b/wdl-lint/src/rules/disallowed_input_name.rs @@ -4,12 +4,14 @@ use wdl_ast::v1::BoundDecl; use wdl_ast::v1::Decl; use wdl_ast::v1::InputSection; use wdl_ast::v1::UnboundDecl; +use wdl_ast::AstNode; use wdl_ast::AstToken; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -108,26 +110,38 @@ impl Visitor for DisallowedInputNameRule { fn bound_decl(&mut self, state: &mut Self::State, reason: VisitReason, decl: &BoundDecl) { if reason == VisitReason::Enter && self.input_section { - check_decl_name(state, &Decl::Bound(decl.clone())); + check_decl_name(state, &Decl::Bound(decl.clone()), &self.exceptable_nodes()); } } fn unbound_decl(&mut self, state: &mut Self::State, reason: VisitReason, decl: &UnboundDecl) { if reason == VisitReason::Enter && self.input_section { - check_decl_name(state, &Decl::Unbound(decl.clone())); + check_decl_name( + state, + &Decl::Unbound(decl.clone()), + &self.exceptable_nodes(), + ); } } } /// Check declaration name -fn check_decl_name(state: &mut Diagnostics, decl: &Decl) { +fn check_decl_name( + state: &mut Diagnostics, + decl: &Decl, + exceptable_nodes: &Option>, +) { let name = decl.name(); let name = name.as_str(); let length = name.len(); if length < 3 { // name is too short - state.add(decl_identifier_too_short(decl.name().span())); + state.exceptable_add( + decl_identifier_too_short(decl.name().span()), + SyntaxElement::from(decl.syntax().clone()), + exceptable_nodes, + ); } let mut name = name.chars().peekable(); @@ -138,12 +152,20 @@ fn check_decl_name(state: &mut Diagnostics, decl: &Decl) { if let Some(c) = name.peek() { if c.is_ascii_uppercase() || c == &'_' { // name starts with "in" - state.add(decl_identifier_starts_with_in(decl.name().span())); + state.exceptable_add( + decl_identifier_starts_with_in(decl.name().span()), + SyntaxElement::from(decl.syntax().clone()), + exceptable_nodes, + ); } else { let s: String = name.take(3).collect(); if s == "put" { // name starts with "input" - state.add(decl_identifier_starts_with_input(decl.name().span())); + state.exceptable_add( + decl_identifier_starts_with_input(decl.name().span()), + SyntaxElement::from(decl.syntax().clone()), + exceptable_nodes, + ); } } } diff --git a/wdl-lint/src/rules/disallowed_output_name.rs b/wdl-lint/src/rules/disallowed_output_name.rs index 2cad192a..fbf066ae 100644 --- a/wdl-lint/src/rules/disallowed_output_name.rs +++ b/wdl-lint/src/rules/disallowed_output_name.rs @@ -4,12 +4,14 @@ use wdl_ast::v1::BoundDecl; use wdl_ast::v1::Decl; use wdl_ast::v1::OutputSection; use wdl_ast::v1::UnboundDecl; +use wdl_ast::AstNode; use wdl_ast::AstToken; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -107,26 +109,38 @@ impl Visitor for DisallowedOutputNameRule { fn bound_decl(&mut self, state: &mut Self::State, reason: VisitReason, decl: &BoundDecl) { if reason == VisitReason::Enter && self.output_section { - check_decl_name(state, &Decl::Bound(decl.clone())); + check_decl_name(state, &Decl::Bound(decl.clone()), &self.exceptable_nodes()); } } fn unbound_decl(&mut self, state: &mut Self::State, reason: VisitReason, decl: &UnboundDecl) { if reason == VisitReason::Enter && self.output_section { - check_decl_name(state, &Decl::Unbound(decl.clone())); + check_decl_name( + state, + &Decl::Unbound(decl.clone()), + &self.exceptable_nodes(), + ); } } } /// Check declaration name -fn check_decl_name(state: &mut Diagnostics, decl: &Decl) { +fn check_decl_name( + state: &mut Diagnostics, + decl: &Decl, + exceptable_nodes: &Option>, +) { let name = decl.name(); let name = name.as_str(); let length = name.len(); if length < 3 { // name is too short - state.add(decl_identifier_too_short(decl.name().span())); + state.exceptable_add( + decl_identifier_too_short(decl.name().span()), + SyntaxElement::from(decl.syntax().clone()), + exceptable_nodes, + ); } let mut name = name.chars().peekable(); @@ -139,12 +153,20 @@ fn check_decl_name(state: &mut Diagnostics, decl: &Decl) { if let Some(c) = name.peek() { if c.is_ascii_uppercase() || c == &'_' { // name starts with "out" - state.add(decl_identifier_starts_with_out(decl.name().span())); + state.exceptable_add( + decl_identifier_starts_with_out(decl.name().span()), + SyntaxElement::from(decl.syntax().clone()), + exceptable_nodes, + ); } else { let s: String = name.take(3).collect(); if s == "put" { // name starts with "output" - state.add(decl_identifier_starts_with_output(decl.name().span())); + state.exceptable_add( + decl_identifier_starts_with_output(decl.name().span()), + SyntaxElement::from(decl.syntax().clone()), + exceptable_nodes, + ); } } } diff --git a/wdl-lint/src/rules/double_quotes.rs b/wdl-lint/src/rules/double_quotes.rs index cdc4f3c4..1e3907b7 100644 --- a/wdl-lint/src/rules/double_quotes.rs +++ b/wdl-lint/src/rules/double_quotes.rs @@ -4,11 +4,13 @@ use wdl_ast::span_of; use wdl_ast::v1::Expr; use wdl_ast::v1::LiteralExpr; use wdl_ast::v1::LiteralStringKind; +use wdl_ast::AstNode; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -89,7 +91,11 @@ impl Visitor for DoubleQuotesRule { if let Expr::Literal(LiteralExpr::String(s)) = expr { if s.kind() == LiteralStringKind::SingleQuoted { - state.add(use_double_quotes(span_of(s))); + state.exceptable_add( + use_double_quotes(span_of(s)), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/ending_newline.rs b/wdl-lint/src/rules/ending_newline.rs index 93db1b7a..52081e8b 100644 --- a/wdl-lint/src/rules/ending_newline.rs +++ b/wdl-lint/src/rules/ending_newline.rs @@ -108,16 +108,25 @@ impl Visitor for EndingNewlineRule { } if extra > 0 { + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes state.add(multiple_ending_newline( Span::new(start + text.len(), len - text.len() - 1), extra, )); } } + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes None => state.add(missing_ending_newline(Span::new(start + (len - 1), 1))), } } Some(last) => { + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes state.add(missing_ending_newline(Span::new( usize::from(last.text_range().end()) - 1, 1, diff --git a/wdl-lint/tests/lints/deprecated-object/source.errors b/wdl-lint/tests/lints/deprecated-object/source.errors index 25cb2c52..71d8e572 100644 --- a/wdl-lint/tests/lints/deprecated-object/source.errors +++ b/wdl-lint/tests/lints/deprecated-object/source.errors @@ -22,11 +22,3 @@ note[DeprecatedObject]: use of a deprecated `Object` type │ = fix: replace the `Object` with a `Map` or a `Struct` -note[DeprecatedObject]: use of a deprecated `Object` type - ┌─ tests/lints/deprecated-object/source.wdl:24:9 - │ -24 │ Object but_this_is_okay = object { - │ ^^^^^^ - │ - = fix: replace the `Object` with a `Map` or a `Struct` - diff --git a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors index eb244c7d..da664f2d 100644 --- a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors +++ b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors @@ -46,51 +46,3 @@ warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholde │ = fix: replace the `default` placeholder option with a call to the `select_first()` standard library function -warning[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder option - ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:47:32 - │ -47 │ String bad_sep_option = "~{sep="," numbers}" - │ ^^^^^^^ - │ - = fix: replace the `sep` placeholder option with a call to the `sep()` standard library function - -warning[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` placeholder option - ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:48:39 - │ -48 │ String bad_true_false_option = "~{true="--enable-foo" false="" allow_foo}" - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: replace the `true`/`false` placeholder option with an `if`/`else` expression - -warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholder option - ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:49:36 - │ -49 │ String bad_default_option = "~{default="false" bar}" - │ ^^^^^^^^^^^^^^^ - │ - = fix: replace the `default` placeholder option with a call to the `select_first()` standard library function - -warning[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder option - ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:52:28 - │ -52 │ python script.py ~{sep=" " numbers} - │ ^^^^^^^ - │ - = fix: replace the `sep` placeholder option with a call to the `sep()` standard library function - -warning[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` placeholder option - ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:53:27 - │ -53 │ example-command ~{true="--enable-foo" false="" allow_foo} - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: replace the `true`/`false` placeholder option with an `if`/`else` expression - -warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholder option - ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:54:27 - │ -54 │ another-command ~{default="foobar" bar} - │ ^^^^^^^^^^^^^^^^ - │ - = fix: replace the `default` placeholder option with a call to the `select_first()` standard library function - diff --git a/wdl-lint/tests/lints/except/source.errors b/wdl-lint/tests/lints/except/source.errors index b4a1504c..d94d35f6 100644 --- a/wdl-lint/tests/lints/except/source.errors +++ b/wdl-lint/tests/lints/except/source.errors @@ -78,11 +78,3 @@ warning[DoubleQuotes]: string defined with single quotes │ = fix: change the single quotes to double quotes -warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/except/source.wdl:30:9 - │ -30 │ 'good string' # OK - │ ^^^^^^^^^^^^^ - │ - = fix: change the single quotes to double quotes - From ad041ab6b182ee6e1d9de06c6fb14d2f8897aee6 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 10 Sep 2024 17:04:49 -0400 Subject: [PATCH 06/30] feat: finish transitioning to exceptable_add in wdl-lint --- .../rules/deprecated_placeholder_option.rs | 4 +- wdl-lint/src/rules/expression_spacing.rs | 141 +++++++++++++----- wdl-lint/src/rules/import_placement.rs | 7 +- wdl-lint/src/rules/import_sort.rs | 6 + wdl-lint/src/rules/import_whitespace.rs | 34 +++-- wdl-lint/src/rules/inconsistent_newlines.rs | 8 +- wdl-lint/src/rules/input_not_sorted.rs | 7 +- wdl-lint/src/rules/key_value_pairs.rs | 107 ++++++++----- wdl-lint/src/rules/line_width.rs | 32 +++- wdl-lint/src/rules/matching_parameter_meta.rs | 18 ++- wdl-lint/src/rules/missing_metas.rs | 72 +++++---- wdl-lint/src/rules/missing_output.rs | 22 +-- wdl-lint/src/rules/missing_requirements.rs | 14 +- wdl-lint/src/rules/missing_runtime.rs | 8 +- wdl-lint/src/rules/no_curly_commands.rs | 10 +- wdl-lint/src/rules/nonmatching_output.rs | 107 ++++++++----- wdl-lint/src/rules/pascal_case.rs | 24 ++- wdl-lint/src/rules/preamble_comments.rs | 3 + wdl-lint/src/rules/preamble_whitespace.rs | 7 + wdl-lint/src/rules/runtime_section_keys.rs | 38 +++-- wdl-lint/src/rules/section_order.rs | 29 ++-- wdl-lint/src/rules/snake_case.rs | 49 +++++- wdl-lint/src/rules/todo.rs | 7 +- wdl-lint/src/rules/trailing_comma.rs | 98 +++++++----- wdl-lint/src/rules/unknown_rule.rs | 3 + wdl-lint/src/rules/whitespace.rs | 25 ++-- wdl-lint/tests/lints/except/source.errors | 48 ------ .../lints/input-not-sorted/source.errors | 8 - wdl-lint/tests/lints/line-width/source.errors | 16 -- .../lints/nonmatching-output/source.errors | 24 --- .../tests/lints/pascal-case/source.errors | 8 - wdl-lint/tests/lints/snake-case/source.errors | 8 - wdl-lint/tests/lints/todo/source.errors | 16 -- 33 files changed, 629 insertions(+), 379 deletions(-) diff --git a/wdl-lint/src/rules/deprecated_placeholder_option.rs b/wdl-lint/src/rules/deprecated_placeholder_option.rs index 81bcadf6..f22df121 100644 --- a/wdl-lint/src/rules/deprecated_placeholder_option.rs +++ b/wdl-lint/src/rules/deprecated_placeholder_option.rs @@ -144,9 +144,7 @@ impl Visitor for DeprecatedPlaceholderOptionRule { if let Some(option) = placeholder.option() { let diagnostic = match option { - PlaceholderOption::Sep(option) => { - deprecated_sep_placeholder_option(option.span()) - } + PlaceholderOption::Sep(option) => deprecated_sep_placeholder_option(option.span()), PlaceholderOption::Default(option) => { deprecated_default_placeholder_option(option.span()) } diff --git a/wdl-lint/src/rules/expression_spacing.rs b/wdl-lint/src/rules/expression_spacing.rs index 9684306c..503c1f91 100644 --- a/wdl-lint/src/rules/expression_spacing.rs +++ b/wdl-lint/src/rules/expression_spacing.rs @@ -1,7 +1,6 @@ //! A lint rule for spacing of expressions. use rowan::Direction; -use rowan::NodeOrToken; use wdl_ast::v1::Expr; use wdl_ast::v1::LiteralExpr; use wdl_ast::AstNode; @@ -10,9 +9,8 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; -use wdl_ast::SyntaxNode; -use wdl_ast::SyntaxToken; use wdl_ast::ToSpan; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -240,7 +238,11 @@ impl Visitor for ExpressionSpacingRule { .count() > 0 { - state.add(prefix_whitespace(expr.syntax().text_range().to_span())); + state.exceptable_add( + prefix_whitespace(expr.syntax().text_range().to_span()), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } } Expr::Parenthesized(_) => { @@ -296,7 +298,7 @@ impl Visitor for ExpressionSpacingRule { | SyntaxKind::LogicalOr => {} _ => { // opening parens should be preceded by whitespace - state.add(missing_preceding_whitespace(open.text_range().to_span())); + state.exceptable_add(missing_preceding_whitespace(open.text_range().to_span()), SyntaxElement::from(expr.syntax().clone()), &self.exceptable_nodes()); } } } @@ -312,7 +314,11 @@ impl Visitor for ExpressionSpacingRule { .is_some_and(|t| t.kind() != SyntaxKind::Comment) { // opening parens should not be followed by non-newline whitespace - state.add(disallowed_space(token.text_range().to_span())); + state.exceptable_add( + disallowed_space(token.text_range().to_span()), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -329,7 +335,11 @@ impl Visitor for ExpressionSpacingRule { { // closing parenthesis should not be preceded by whitespace without a // newline - state.add(disallowed_space(close_prev.text_range().to_span())); + state.exceptable_add( + disallowed_space(close_prev.text_range().to_span()), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -341,7 +351,7 @@ impl Visitor for ExpressionSpacingRule { .find(|t| matches!(t.kind(), SyntaxKind::LogicalAnd | SyntaxKind::LogicalOr)) .expect("expression node should have an operator"); - check_required_surrounding_ws(state, &op); + check_required_surrounding_ws(state, &op, &self.exceptable_nodes()); } Expr::Equality(_) | Expr::Inequality(_) => { // find the operator @@ -351,7 +361,7 @@ impl Visitor for ExpressionSpacingRule { .find(|t| matches!(t.kind(), SyntaxKind::Equal | SyntaxKind::NotEqual)) .expect("expression node should have an operator"); - check_required_surrounding_ws(state, &op); + check_required_surrounding_ws(state, &op, &self.exceptable_nodes()); } Expr::Addition(_) | Expr::Subtraction(_) @@ -377,7 +387,7 @@ impl Visitor for ExpressionSpacingRule { .expect("expression node should have an operator"); // Infix operators must be surrounded by whitespace - check_required_surrounding_ws(state, &op); + check_required_surrounding_ws(state, &op, &self.exceptable_nodes()); } Expr::Less(_) | Expr::LessEqual(_) | Expr::Greater(_) | Expr::GreaterEqual(_) => { // find the operator @@ -395,7 +405,7 @@ impl Visitor for ExpressionSpacingRule { }) .expect("expression node should have an operator"); - check_required_surrounding_ws(state, &op); + check_required_surrounding_ws(state, &op, &self.exceptable_nodes()); } Expr::If(_) => { // find the if keyword @@ -454,7 +464,11 @@ impl Visitor for ExpressionSpacingRule { } } if !open_paren || !newline { - state.add(multiline_if_open_paren(if_keyword.text_range().to_span())); + state.exceptable_add( + multiline_if_open_paren(if_keyword.text_range().to_span()), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } // check the then keyword @@ -466,7 +480,11 @@ impl Visitor for ExpressionSpacingRule { || !then_ws.to_string().contains('\n') { // then should be preceded by a newline - state.add(multiline_then_space(then_keyword.text_range().to_span())); + state.exceptable_add( + multiline_then_space(then_keyword.text_range().to_span()), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } // else keyword should be preceded by a newline @@ -477,7 +495,11 @@ impl Visitor for ExpressionSpacingRule { || !else_prior.to_string().contains('\n') { // then should be preceded by a newline - state.add(multiline_else_space(else_keyword.text_range().to_span())); + state.exceptable_add( + multiline_else_space(else_keyword.text_range().to_span()), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } // check the closing parenthesis @@ -503,9 +525,11 @@ impl Visitor for ExpressionSpacingRule { } } if !close_paren || !newline { - state.add(multiline_if_close_paren( - else_keyword.text_range().to_span(), - )); + state.exceptable_add( + multiline_if_close_paren(else_keyword.text_range().to_span()), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -538,7 +562,11 @@ impl Visitor for ExpressionSpacingRule { checks.iter().for_each(|f| { if let Some(ws) = f { - state.add(disallowed_space(ws.text_range().to_span())); + state.exceptable_add( + disallowed_space(ws.text_range().to_span()), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } }); } @@ -556,10 +584,18 @@ impl Visitor for ExpressionSpacingRule { .filter(|t| t.kind() == SyntaxKind::Whitespace); if let Some(ws) = before_ws { - state.add(disallowed_space(ws.text_range().to_span())); + state.exceptable_add( + disallowed_space(ws.text_range().to_span()), + SyntaxElement::from(acc.syntax().clone()), + &self.exceptable_nodes(), + ); } if let Some(ws) = after_ws { - state.add(disallowed_space(ws.text_range().to_span())); + state.exceptable_add( + disallowed_space(ws.text_range().to_span()), + SyntaxElement::from(acc.syntax().clone()), + &self.exceptable_nodes(), + ); } } Expr::Literal(l) => { @@ -627,9 +663,13 @@ impl Visitor for ExpressionSpacingRule { } } if !newline { - state.add(multiline_literal_open_newline( - open_bracket.text_range().to_span(), - )); + state.exceptable_add( + multiline_literal_open_newline( + open_bracket.text_range().to_span(), + ), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } let close_bracket_prior = close_bracket @@ -654,9 +694,13 @@ impl Visitor for ExpressionSpacingRule { } } if !newline { - state.add(multiline_literal_close_newline( - close_bracket.text_range().to_span(), - )); + state.exceptable_add( + multiline_literal_close_newline( + close_bracket.text_range().to_span(), + ), + SyntaxElement::from(expr.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -690,19 +734,25 @@ impl Visitor for ExpressionSpacingRule { if !before_ws && !after_ws { // assignments must be surrounded by whitespace - state.add(assignment_missing_surrounding_whitespace( - assign.text_range().to_span(), - )); + state.exceptable_add( + assignment_missing_surrounding_whitespace(assign.text_range().to_span()), + SyntaxElement::from(decl.syntax().clone()), + &self.exceptable_nodes(), + ); } else if !before_ws { // assignments must be preceded by whitespace - state.add(assignment_missing_preceding_whitespace( - assign.text_range().to_span(), - )); + state.exceptable_add( + assignment_missing_preceding_whitespace(assign.text_range().to_span()), + SyntaxElement::from(decl.syntax().clone()), + &self.exceptable_nodes(), + ); } else if !after_ws { // assignments must be followed by whitespace - state.add(assignment_missing_following_whitespace( - assign.text_range().to_span(), - )); + state.exceptable_add( + assignment_missing_following_whitespace(assign.text_range().to_span()), + SyntaxElement::from(decl.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -711,19 +761,32 @@ impl Visitor for ExpressionSpacingRule { /// Checks to ensure a token is surrounded by whitespace. fn check_required_surrounding_ws( state: &mut Diagnostics, - op: &NodeOrToken, + op: &SyntaxElement, + exceptable_nodes: &Option>, ) { let before_ws = op.prev_sibling_or_token().map(|t| t.kind()) == Some(SyntaxKind::Whitespace); let after_ws = op.next_sibling_or_token().map(|t| t.kind()) == Some(SyntaxKind::Whitespace); if !before_ws && !after_ws { // must be surrounded by whitespace - state.add(missing_surrounding_whitespace(op.text_range().to_span())); + state.exceptable_add( + missing_surrounding_whitespace(op.text_range().to_span()), + op.clone(), + exceptable_nodes, + ); } else if !before_ws { // must be preceded by whitespace - state.add(missing_preceding_whitespace(op.text_range().to_span())); + state.exceptable_add( + missing_preceding_whitespace(op.text_range().to_span()), + op.clone(), + exceptable_nodes, + ); } else if !after_ws { // must be followed by whitespace - state.add(missing_following_whitespace(op.text_range().to_span())); + state.exceptable_add( + missing_following_whitespace(op.text_range().to_span()), + op.clone(), + exceptable_nodes, + ); } } diff --git a/wdl-lint/src/rules/import_placement.rs b/wdl-lint/src/rules/import_placement.rs index 1518997c..e0e26fad 100644 --- a/wdl-lint/src/rules/import_placement.rs +++ b/wdl-lint/src/rules/import_placement.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -95,7 +96,11 @@ impl Visitor for ImportPlacementRule { } if self.invalid { - state.add(misplaced_import(stmt.syntax().text_range().to_span())); + state.exceptable_add( + misplaced_import(stmt.syntax().text_range().to_span()), + SyntaxElement::from(stmt.syntax().clone()), + &self.exceptable_nodes(), + ); } } diff --git a/wdl-lint/src/rules/import_sort.rs b/wdl-lint/src/rules/import_sort.rs index 72478410..454a0821 100644 --- a/wdl-lint/src/rules/import_sort.rs +++ b/wdl-lint/src/rules/import_sort.rs @@ -92,6 +92,9 @@ impl Visitor for ImportSortRule { for import in imports { if let Some(prev) = prev_import { if import.text().to_string() < prev.text().to_string() { + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes state.add(import_not_sorted(import.text_range().to_span())); return; // Only report one sorting diagnostic at a time. } @@ -118,6 +121,9 @@ impl Visitor for ImportSortRule { .map(|c| c.into_token().unwrap()); for comment in internal_comments { + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes state.add(improper_comment(comment.text_range().to_span())); } } diff --git a/wdl-lint/src/rules/import_whitespace.rs b/wdl-lint/src/rules/import_whitespace.rs index 97d70f45..afd21c52 100644 --- a/wdl-lint/src/rules/import_whitespace.rs +++ b/wdl-lint/src/rules/import_whitespace.rs @@ -121,9 +121,11 @@ impl Visitor for ImportWhitespaceRule { for token in internal_whitespace { if token.text() != " " && token.prev_token().unwrap().kind() != SyntaxKind::Comment { - state.add(improper_whitespace_within_import( - token.text_range().to_span(), - )); + state.exceptable_add( + improper_whitespace_within_import(token.text_range().to_span()), + SyntaxElement::from(token), + &self.exceptable_nodes(), + ); } } @@ -139,10 +141,14 @@ impl Visitor for ImportWhitespaceRule { let span = token.text_range().to_span(); for (text, offset, _) in lines_with_offset(token.text()) { if !text.is_empty() { - state.add(improper_whitespace_before_import(Span::new( - span.start() + offset, - span.len() - offset, - ))); + state.exceptable_add( + improper_whitespace_before_import(Span::new( + span.start() + offset, + span.len() - offset, + )), + SyntaxElement::from(token.clone()), + &self.exceptable_nodes(), + ); } } } @@ -181,10 +187,16 @@ impl Visitor for ImportWhitespaceRule { if should_warn { let span = token.text_range().to_span(); - state.add(blank_between_imports(Span::new( - span.start() + second_line_start.expect("should have a second line start"), - span.len() - second_line_start.expect("should have a second line start"), - ))); + state.exceptable_add( + blank_between_imports(Span::new( + span.start() + + second_line_start.expect("should have a second line start"), + span.len() + - second_line_start.expect("should have a second line start"), + )), + SyntaxElement::from(token.clone()), + &self.exceptable_nodes(), + ); } } else if token.kind() != SyntaxKind::Comment { // We've backed into non-trivia, so we're done. diff --git a/wdl-lint/src/rules/inconsistent_newlines.rs b/wdl-lint/src/rules/inconsistent_newlines.rs index e3fbd5ef..7a451e8a 100644 --- a/wdl-lint/src/rules/inconsistent_newlines.rs +++ b/wdl-lint/src/rules/inconsistent_newlines.rs @@ -5,6 +5,7 @@ use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; use wdl_ast::Whitespace; @@ -53,8 +54,8 @@ impl Rule for InconsistentNewlinesRule { TagSet::new(&[Tag::Style, Tag::Clarity]) } - fn exceptable_nodes(&self) -> Option> { - None + fn exceptable_nodes(&self) -> Option> { + Some(vec![SyntaxKind::VersionStatementNode]) } } @@ -76,6 +77,9 @@ impl Visitor for InconsistentNewlinesRule { } if self.newline > 0 && self.carriage_return > 0 { + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes state.add(inconsistent_newlines(self.first_inconsistent.unwrap())); } } diff --git a/wdl-lint/src/rules/input_not_sorted.rs b/wdl-lint/src/rules/input_not_sorted.rs index 77566184..6935a0c8 100644 --- a/wdl-lint/src/rules/input_not_sorted.rs +++ b/wdl-lint/src/rules/input_not_sorted.rs @@ -12,6 +12,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -271,7 +272,11 @@ impl Visitor for InputNotSortedRule { } }); if errors > 0 { - state.add(input_not_sorted(input.span(), input_string)); + state.exceptable_add( + input_not_sorted(input.span(), input_string), + SyntaxElement::from(input.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/key_value_pairs.rs b/wdl-lint/src/rules/key_value_pairs.rs index 83f9ed93..e949e14d 100644 --- a/wdl-lint/src/rules/key_value_pairs.rs +++ b/wdl-lint/src/rules/key_value_pairs.rs @@ -8,6 +8,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -143,7 +144,11 @@ impl Visitor for KeyValuePairsRule { let parent_ws = tmp.split('\n').last().expect("should have indentation"); if !item.syntax().to_string().contains('\n') { - state.add(all_on_one_line(item.syntax().text_range().to_span())); + state.exceptable_add( + all_on_one_line(item.syntax().text_range().to_span()), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); return; } @@ -154,7 +159,11 @@ impl Visitor for KeyValuePairsRule { .expect("should have an opening delimiter"); if let Some(open_ws) = open_delim.next_sibling_or_token() { if open_ws.kind() != SyntaxKind::Whitespace || !open_ws.to_string().contains('\n') { - state.add(missing_trailing_newline(open_delim.text_range().to_span())) + state.exceptable_add( + missing_trailing_newline(open_delim.text_range().to_span()), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } @@ -173,10 +182,11 @@ impl Visitor for KeyValuePairsRule { } else { close_delim.text_range().start() }; - state.add(missing_trailing_newline(Span::new( - s.start(), - usize::from(end) - s.start(), - ))); + state.exceptable_add( + missing_trailing_newline(Span::new(s.start(), usize::from(end) - s.start())), + SyntaxElement::from(child.syntax().clone()), + &self.exceptable_nodes(), + ); } // Check indentation. If there is no prior whitespace, that will have been // reported already. @@ -189,11 +199,15 @@ impl Visitor for KeyValuePairsRule { let expected_ws = parent_ws.to_owned() + INDENT; if ws != expected_ws { - state.add(incorrect_indentation( - prior_ws.text_range().to_span(), - &expected_ws, - ws, - )); + state.exceptable_add( + incorrect_indentation( + prior_ws.text_range().to_span(), + &expected_ws, + ws, + ), + SyntaxElement::from(child.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -211,14 +225,18 @@ impl Visitor for KeyValuePairsRule { let expected_ws = parent_ws.to_owned(); if ws != expected_ws { - state.add(incorrect_indentation( - Span::new( - usize::from(close_delim.text_range().start()) - ws.len(), - ws.len(), + state.exceptable_add( + incorrect_indentation( + Span::new( + usize::from(close_delim.text_range().start()) - ws.len(), + ws.len(), + ), + &expected_ws, + ws, ), - &expected_ws, - ws, - )); + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -247,7 +265,11 @@ impl Visitor for KeyValuePairsRule { // If the array is all on one line, report that if !item.syntax().to_string().contains('\n') { - state.add(all_on_one_line(item.syntax().text_range().to_span())); + state.exceptable_add( + all_on_one_line(item.syntax().text_range().to_span()), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); return; } @@ -258,7 +280,11 @@ impl Visitor for KeyValuePairsRule { .expect("should have an opening delimiter"); if let Some(open_ws) = open_delim.next_sibling_or_token() { if open_ws.kind() != SyntaxKind::Whitespace || !open_ws.to_string().contains('\n') { - state.add(missing_trailing_newline(open_delim.text_range().to_span())) + state.exceptable_add( + missing_trailing_newline(open_delim.text_range().to_span()), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } @@ -277,10 +303,11 @@ impl Visitor for KeyValuePairsRule { } else { close_delim.text_range().start() }; - state.add(missing_trailing_newline(Span::new( - s.start(), - usize::from(end) - s.start(), - ))); + state.exceptable_add( + missing_trailing_newline(Span::new(s.start(), usize::from(end) - s.start())), + SyntaxElement::from(child.syntax().clone()), + &self.exceptable_nodes(), + ); } // Check indentation. If there is no prior whitespace, that will have been // reported already. @@ -296,11 +323,15 @@ impl Visitor for KeyValuePairsRule { let expected_ws = parent_ws.to_owned() + INDENT; if ws != expected_ws { - state.add(incorrect_indentation( - prior_ws.text_range().to_span(), - &expected_ws, - ws, - )); + state.exceptable_add( + incorrect_indentation( + prior_ws.text_range().to_span(), + &expected_ws, + ws, + ), + SyntaxElement::from(child.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -318,14 +349,18 @@ impl Visitor for KeyValuePairsRule { let expected_ws = parent_ws.to_owned(); if ws != expected_ws { - state.add(incorrect_indentation( - Span::new( - usize::from(close_delim.text_range().start()) - ws.len(), - ws.len(), + state.exceptable_add( + incorrect_indentation( + Span::new( + usize::from(close_delim.text_range().start()) - ws.len(), + ws.len(), + ), + &expected_ws, + ws, ), - &expected_ws, - ws, - )); + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/line_width.rs b/wdl-lint/src/rules/line_width.rs index b1f1f15b..ab6b7daf 100644 --- a/wdl-lint/src/rules/line_width.rs +++ b/wdl-lint/src/rules/line_width.rs @@ -7,6 +7,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::VisitReason; use wdl_ast::Visitor; use wdl_ast::Whitespace; @@ -47,7 +48,14 @@ impl LineWidthRule { } /// Detects lines that exceed a certain width. - fn detect_line_too_long(&mut self, state: &mut Diagnostics, text: &str, start: usize) { + fn detect_line_too_long( + &mut self, + state: &mut Diagnostics, + text: &str, + start: usize, + element: SyntaxElement, + exceptable_nodes: &Option>, + ) { for offset in text .char_indices() .filter(|(_, c)| *c == '\n') @@ -58,7 +66,11 @@ impl LineWidthRule { if !self.ignored_section && current_offset - previous_offset > self.max_width { let span = Span::new(previous_offset, current_offset - previous_offset); - state.add(line_too_long(span, self.max_width)); + state.exceptable_add( + line_too_long(span, self.max_width), + element.clone(), + exceptable_nodes, + ); } self.previous_newline_offset = Some(current_offset + 1); @@ -123,11 +135,23 @@ impl Visitor for LineWidthRule { } fn whitespace(&mut self, state: &mut Self::State, whitespace: &Whitespace) { - self.detect_line_too_long(state, whitespace.as_str(), whitespace.span().start()); + self.detect_line_too_long( + state, + whitespace.as_str(), + whitespace.span().start(), + SyntaxElement::from(whitespace.syntax().clone()), + &self.exceptable_nodes(), + ); } fn command_text(&mut self, state: &mut Self::State, text: &v1::CommandText) { - self.detect_line_too_long(state, text.as_str(), text.span().start()) + self.detect_line_too_long( + state, + text.as_str(), + text.span().start(), + SyntaxElement::from(text.syntax().clone()), + &self.exceptable_nodes(), + ); } fn metadata_section( diff --git a/wdl-lint/src/rules/matching_parameter_meta.rs b/wdl-lint/src/rules/matching_parameter_meta.rs index 547c213f..d87a6044 100644 --- a/wdl-lint/src/rules/matching_parameter_meta.rs +++ b/wdl-lint/src/rules/matching_parameter_meta.rs @@ -7,6 +7,7 @@ use wdl_ast::v1::SectionParent; use wdl_ast::v1::TaskDefinition; use wdl_ast::v1::WorkflowDefinition; use wdl_ast::version::V1; +use wdl_ast::AstNode; use wdl_ast::AstToken; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; @@ -14,6 +15,7 @@ use wdl_ast::Document; use wdl_ast::Ident; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -108,6 +110,7 @@ fn check_parameter_meta( expected: impl Iterator, param_meta: ParameterMetadataSection, diagnostics: &mut Diagnostics, + exceptable_nodes: &Option>, ) { let expected: HashMap<_, _> = expected.map(|(i, s)| (i.as_str().to_string(), s)).collect(); @@ -121,13 +124,21 @@ fn check_parameter_meta( for (name, span) in &expected { if !actual.contains_key(name) { - diagnostics.add(missing_param_meta(parent, name, *span)); + diagnostics.exceptable_add( + missing_param_meta(parent, name, *span), + SyntaxElement::from(param_meta.syntax().clone()), + exceptable_nodes, + ); } } for (name, span) in &actual { if !expected.contains_key(name) { - diagnostics.add(extra_param_meta(parent, name, *span)); + diagnostics.exceptable_add( + extra_param_meta(parent, name, *span), + SyntaxElement::from(param_meta.syntax().clone()), + exceptable_nodes, + ); } } } @@ -176,6 +187,7 @@ impl Visitor for MatchingParameterMetaRule { }), param_meta, state, + &self.exceptable_nodes(), ); } None => { @@ -210,6 +222,7 @@ impl Visitor for MatchingParameterMetaRule { }), param_meta, state, + &self.exceptable_nodes(), ); } None => { @@ -247,6 +260,7 @@ impl Visitor for MatchingParameterMetaRule { }), param_meta, state, + &self.exceptable_nodes(), ); } None => { diff --git a/wdl-lint/src/rules/missing_metas.rs b/wdl-lint/src/rules/missing_metas.rs index 31431883..ebd1d7f8 100644 --- a/wdl-lint/src/rules/missing_metas.rs +++ b/wdl-lint/src/rules/missing_metas.rs @@ -5,12 +5,14 @@ use std::fmt; use wdl_ast::v1::TaskDefinition; use wdl_ast::v1::WorkflowDefinition; use wdl_ast::version::V1; +use wdl_ast::AstNode; use wdl_ast::AstToken; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Ident; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -157,15 +159,23 @@ impl Visitor for MissingMetasRule { let inputs_present = task.input().is_some(); if inputs_present && task.metadata().is_none() && task.parameter_metadata().is_none() { - state.add(missing_sections(task.name(), Context::Task)); + state.exceptable_add( + missing_sections(task.name(), Context::Task), + SyntaxElement::from(task.syntax().clone()), + &self.exceptable_nodes(), + ); } else if task.metadata().is_none() { - state.add(missing_section(task.name(), Section::Meta, Context::Task)); + state.exceptable_add( + missing_section(task.name(), Section::Meta, Context::Task), + SyntaxElement::from(task.syntax().clone()), + &self.exceptable_nodes(), + ); } else if inputs_present && task.parameter_metadata().is_none() { - state.add(missing_section( - task.name(), - Section::ParameterMeta, - Context::Task, - )); + state.exceptable_add( + missing_section(task.name(), Section::ParameterMeta, Context::Task), + SyntaxElement::from(task.syntax().clone()), + &self.exceptable_nodes(), + ); } } @@ -185,19 +195,23 @@ impl Visitor for MissingMetasRule { && workflow.metadata().is_none() && workflow.parameter_metadata().is_none() { - state.add(missing_sections(workflow.name(), Context::Workflow)); + state.exceptable_add( + missing_sections(workflow.name(), Context::Workflow), + SyntaxElement::from(workflow.syntax().clone()), + &self.exceptable_nodes(), + ); } else if workflow.metadata().is_none() { - state.add(missing_section( - workflow.name(), - Section::Meta, - Context::Workflow, - )); + state.exceptable_add( + missing_section(workflow.name(), Section::Meta, Context::Workflow), + SyntaxElement::from(workflow.syntax().clone()), + &self.exceptable_nodes(), + ); } else if inputs_present && workflow.parameter_metadata().is_none() { - state.add(missing_section( - workflow.name(), - Section::ParameterMeta, - Context::Workflow, - )); + state.exceptable_add( + missing_section(workflow.name(), Section::ParameterMeta, Context::Workflow), + SyntaxElement::from(workflow.syntax().clone()), + &self.exceptable_nodes(), + ); } } @@ -217,15 +231,23 @@ impl Visitor for MissingMetasRule { } if def.metadata().next().is_none() && def.parameter_metadata().next().is_none() { - state.add(missing_sections(def.name(), Context::Struct)); + state.exceptable_add( + missing_sections(def.name(), Context::Struct), + SyntaxElement::from(def.syntax().clone()), + &self.exceptable_nodes(), + ); } else if def.metadata().next().is_none() { - state.add(missing_section(def.name(), Section::Meta, Context::Struct)); + state.exceptable_add( + missing_section(def.name(), Section::Meta, Context::Struct), + SyntaxElement::from(def.syntax().clone()), + &self.exceptable_nodes(), + ); } else if def.parameter_metadata().next().is_none() { - state.add(missing_section( - def.name(), - Section::ParameterMeta, - Context::Struct, - )); + state.exceptable_add( + missing_section(def.name(), Section::ParameterMeta, Context::Struct), + SyntaxElement::from(def.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/missing_output.rs b/wdl-lint/src/rules/missing_output.rs index 5fd7878e..69a4b23e 100644 --- a/wdl-lint/src/rules/missing_output.rs +++ b/wdl-lint/src/rules/missing_output.rs @@ -4,12 +4,14 @@ use std::fmt; use wdl_ast::v1::TaskDefinition; use wdl_ast::v1::WorkflowDefinition; +use wdl_ast::AstNode; use wdl_ast::AstToken; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -108,11 +110,11 @@ impl Visitor for MissingOutputRule { if task.output().is_none() { let name = task.name(); - state.add(missing_output_section( - name.as_str(), - Context::Task, - name.span(), - )); + state.exceptable_add( + missing_output_section(name.as_str(), Context::Task, name.span()), + SyntaxElement::from(task.syntax().clone()), + &self.exceptable_nodes(), + ); } } @@ -128,11 +130,11 @@ impl Visitor for MissingOutputRule { if workflow.output().is_none() { let name = workflow.name(); - state.add(missing_output_section( - name.as_str(), - Context::Workflow, - name.span(), - )); + state.exceptable_add( + missing_output_section(name.as_str(), Context::Workflow, name.span()), + SyntaxElement::from(workflow.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/missing_requirements.rs b/wdl-lint/src/rules/missing_requirements.rs index 6aa6f7e4..a02c16c5 100644 --- a/wdl-lint/src/rules/missing_requirements.rs +++ b/wdl-lint/src/rules/missing_requirements.rs @@ -2,6 +2,7 @@ use wdl_ast::v1::TaskDefinition; use wdl_ast::version::V1; +use wdl_ast::AstNode; use wdl_ast::AstNodeExt; use wdl_ast::AstToken; use wdl_ast::Diagnostic; @@ -9,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -104,12 +106,20 @@ impl Visitor for MissingRequirementsRule { if minor_version >= V1::Two { if task.requirements().is_none() { let name = task.name(); - state.add(missing_requirements_section(name.as_str(), name.span())); + state.exceptable_add( + missing_requirements_section(name.as_str(), name.span()), + SyntaxElement::from(task.syntax().clone()), + &self.exceptable_nodes(), + ); } if let Some(runtime) = task.runtime() { let name = task.name(); - state.add(deprecated_runtime_section(name.as_str(), runtime.span())); + state.exceptable_add( + deprecated_runtime_section(name.as_str(), runtime.span()), + SyntaxElement::from(runtime.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/missing_runtime.rs b/wdl-lint/src/rules/missing_runtime.rs index ace6e4dc..84dbf53a 100644 --- a/wdl-lint/src/rules/missing_runtime.rs +++ b/wdl-lint/src/rules/missing_runtime.rs @@ -2,12 +2,14 @@ use wdl_ast::v1::TaskDefinition; use wdl_ast::version::V1; +use wdl_ast::AstNode; use wdl_ast::AstToken; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -89,7 +91,11 @@ impl Visitor for MissingRuntimeRule { if let SupportedVersion::V1(minor_version) = self.0.expect("version should exist here") { if minor_version <= V1::One && task.runtime().is_none() { let name = task.name(); - state.add(missing_runtime_section(name.as_str(), name.span())); + state.exceptable_add( + missing_runtime_section(name.as_str(), name.span()), + SyntaxElement::from(task.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/no_curly_commands.rs b/wdl-lint/src/rules/no_curly_commands.rs index 119b594a..fde9ebc8 100644 --- a/wdl-lint/src/rules/no_curly_commands.rs +++ b/wdl-lint/src/rules/no_curly_commands.rs @@ -9,6 +9,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -95,10 +96,11 @@ impl Visitor for NoCurlyCommandsRule { let command_keyword = support::token(section.syntax(), SyntaxKind::CommandKeyword) .expect("should have a command keyword token"); - state.add(curly_commands( - name.as_str(), - command_keyword.text_range().to_span(), - )); + state.exceptable_add( + curly_commands(name.as_str(), command_keyword.text_range().to_span()), + SyntaxElement::from(section.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/nonmatching_output.rs b/wdl-lint/src/rules/nonmatching_output.rs index 4814fcd7..65d22e5f 100755 --- a/wdl-lint/src/rules/nonmatching_output.rs +++ b/wdl-lint/src/rules/nonmatching_output.rs @@ -13,6 +13,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -141,19 +142,27 @@ impl<'a> Rule for NonmatchingOutputRule<'a> { } /// Check each output key exists in the `outputs` key within the `meta` section. -fn check_matching(state: &mut Diagnostics, rule: &mut NonmatchingOutputRule<'_>) { +fn check_matching( + state: &mut Diagnostics, + rule: &mut NonmatchingOutputRule<'_>, + element: SyntaxElement, +) { let mut exact_match = true; // Check for expected entries missing from `meta.outputs`. for (name, span) in &rule.output_keys { if !rule.meta_outputs_keys.contains_key(name) { exact_match = false; if rule.current_meta_span.is_some() { - state.add(nonmatching_output( - *span, - name, - rule.name.as_deref().expect("should have a name"), - rule.ty.expect("should have a type"), - )); + state.exceptable_add( + nonmatching_output( + *span, + name, + rule.name.as_deref().expect("should have a name"), + rule.ty.expect("should have a type"), + ), + element.clone(), + &rule.exceptable_nodes(), + ); } } } @@ -163,42 +172,58 @@ fn check_matching(state: &mut Diagnostics, rule: &mut NonmatchingOutputRule<'_>) if !rule.output_keys.contains_key(name) { exact_match = false; if rule.current_output_span.is_some() { - state.add(extra_output_in_meta( - *span, - name, - rule.name.as_deref().expect("should have a name"), - rule.ty.expect("should have a type"), - )); + state.exceptable_add( + extra_output_in_meta( + *span, + name, + rule.name.as_deref().expect("should have a name"), + rule.ty.expect("should have a type"), + ), + element.clone(), + &rule.exceptable_nodes(), + ); } } } // Check for out-of-order entries. if exact_match && !rule.meta_outputs_keys.keys().eq(rule.output_keys.keys()) { - state.add(out_of_order( - rule.current_meta_outputs_span - .expect("should have a `meta.outputs` span"), - rule.current_output_span - .expect("should have an `output` span"), - rule.name.as_deref().expect("should have a name"), - rule.ty.expect("should have a type"), - )); + state.exceptable_add( + out_of_order( + rule.current_meta_outputs_span + .expect("should have a `meta.outputs` span"), + rule.current_output_span + .expect("should have an `output` span"), + rule.name.as_deref().expect("should have a name"), + rule.ty.expect("should have a type"), + ), + element, + &rule.exceptable_nodes(), + ); } } /// Handle missing `meta.outputs` and reset the visitor. -fn handle_meta_outputs_and_reset(state: &mut Diagnostics, rule: &mut NonmatchingOutputRule<'_>) { +fn handle_meta_outputs_and_reset( + state: &mut Diagnostics, + rule: &mut NonmatchingOutputRule<'_>, + element: SyntaxElement, +) { if rule.current_meta_span.is_some() && rule.current_meta_outputs_span.is_none() && !rule.output_keys.is_empty() { - state.add(missing_outputs_in_meta( - rule.current_meta_span.expect("should have a `meta` span"), - rule.name.as_deref().expect("should have a name"), - rule.ty.expect("should have a type"), - )); + state.exceptable_add( + missing_outputs_in_meta( + rule.current_meta_span.expect("should have a `meta` span"), + rule.name.as_deref().expect("should have a name"), + rule.ty.expect("should have a type"), + ), + element, + &rule.exceptable_nodes(), + ); } else { - check_matching(state, rule); + check_matching(state, rule, element); } rule.name = None; @@ -239,7 +264,11 @@ impl<'a> Visitor for NonmatchingOutputRule<'a> { self.ty = Some("workflow"); } VisitReason::Exit => { - handle_meta_outputs_and_reset(state, self); + handle_meta_outputs_and_reset( + state, + self, + SyntaxElement::from(workflow.syntax().clone()), + ); } } } @@ -256,7 +285,11 @@ impl<'a> Visitor for NonmatchingOutputRule<'a> { self.ty = Some("task"); } VisitReason::Exit => { - handle_meta_outputs_and_reset(state, self); + handle_meta_outputs_and_reset( + state, + self, + SyntaxElement::from(task.syntax().clone()), + ); } } } @@ -332,11 +365,15 @@ impl<'a> Visitor for NonmatchingOutputRule<'a> { match item.value() { MetadataValue::Object(_) => {} _ => { - state.add(non_object_meta_outputs( - item.syntax().text_range().to_span(), - self.name.as_deref().expect("should have a name"), - self.ty.expect("should have a type"), - )); + state.exceptable_add( + non_object_meta_outputs( + item.syntax().text_range().to_span(), + self.name.as_deref().expect("should have a name"), + self.ty.expect("should have a type"), + ), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } } else if let Some(meta_outputs_span) = self.current_meta_outputs_span { diff --git a/wdl-lint/src/rules/pascal_case.rs b/wdl-lint/src/rules/pascal_case.rs index a5f6af8a..468855ab 100644 --- a/wdl-lint/src/rules/pascal_case.rs +++ b/wdl-lint/src/rules/pascal_case.rs @@ -4,12 +4,14 @@ use convert_case::Boundary; use convert_case::Case; use convert_case::Converter; use wdl_ast::v1::StructDefinition; +use wdl_ast::AstNode; use wdl_ast::AstToken; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -61,13 +63,23 @@ impl Rule for PascalCaseRule { /// Checks if the given name is pascal case, and if not adds a warning to the /// diagnostics. -fn check_name(name: &str, span: Span, diagnostics: &mut Diagnostics) { +fn check_name( + name: &str, + span: Span, + diagnostics: &mut Diagnostics, + element: SyntaxElement, + exceptable_nodes: &Option>, +) { let converter = Converter::new() .remove_boundaries(&[Boundary::DigitLower, Boundary::LowerDigit]) .to_case(Case::Pascal); let properly_cased_name = converter.convert(name); if name != properly_cased_name { - diagnostics.add(use_pascal_case(name, &properly_cased_name, span)); + diagnostics.exceptable_add( + use_pascal_case(name, &properly_cased_name, span), + element, + exceptable_nodes, + ); } } @@ -100,6 +112,12 @@ impl Visitor for PascalCaseRule { } let name = def.name(); - check_name(name.as_str(), name.span(), state); + check_name( + name.as_str(), + name.span(), + state, + SyntaxElement::from(def.syntax().clone()), + &self.exceptable_nodes(), + ); } } diff --git a/wdl-lint/src/rules/preamble_comments.rs b/wdl-lint/src/rules/preamble_comments.rs index 61a52079..239f1349 100644 --- a/wdl-lint/src/rules/preamble_comments.rs +++ b/wdl-lint/src/rules/preamble_comments.rs @@ -158,6 +158,9 @@ impl Visitor for PreambleCommentsRule { current = sibling.next_sibling_or_token(); } + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes if self.finished { state.add(preamble_comment_after_version(span)); } else { diff --git a/wdl-lint/src/rules/preamble_whitespace.rs b/wdl-lint/src/rules/preamble_whitespace.rs index 2e7a1ba9..d654e1ed 100644 --- a/wdl-lint/src/rules/preamble_whitespace.rs +++ b/wdl-lint/src/rules/preamble_whitespace.rs @@ -114,6 +114,10 @@ impl Visitor for PreambleWhitespaceRule { return; } + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes + // We're finished after the version statement self.entered_version = true; @@ -183,6 +187,9 @@ impl Visitor for PreambleWhitespaceRule { } fn whitespace(&mut self, state: &mut Self::State, whitespace: &Whitespace) { + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes if self.exited_version { // Check to see if we've already checked for a blank line after the version // statement diff --git a/wdl-lint/src/rules/runtime_section_keys.rs b/wdl-lint/src/rules/runtime_section_keys.rs index 6fd1fc7c..974b68be 100644 --- a/wdl-lint/src/rules/runtime_section_keys.rs +++ b/wdl-lint/src/rules/runtime_section_keys.rs @@ -12,6 +12,7 @@ use wdl_ast::v1::RuntimeItem; use wdl_ast::v1::RuntimeSection; use wdl_ast::v1::TaskDefinition; use wdl_ast::version::V1; +use wdl_ast::AstNode; use wdl_ast::AstNodeExt; use wdl_ast::AstToken; use wdl_ast::Diagnostic; @@ -19,6 +20,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Ident; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::TokenStrHash; use wdl_ast::VisitReason; @@ -360,7 +362,7 @@ impl Visitor for RuntimeSectionKeysRule { &mut self, state: &mut Self::State, reason: VisitReason, - _: &TaskDefinition, + def: &TaskDefinition, ) { match reason { VisitReason::Enter => { @@ -383,11 +385,15 @@ impl Visitor for RuntimeSectionKeysRule { let specification = format!("the {minor_version} specification"); if !self.non_reserved_keys.is_empty() { - state.add(report_non_reserved_runtime_keys( - &self.non_reserved_keys, - runtime_span, - &specification, - )); + state.exceptable_add( + report_non_reserved_runtime_keys( + &self.non_reserved_keys, + runtime_span, + &specification, + ), + SyntaxElement::from(def.syntax().clone()), + &self.exceptable_nodes(), + ); } let recommended_keys = match minor_version { @@ -404,11 +410,15 @@ impl Visitor for RuntimeSectionKeysRule { .collect::>(); if !missing_keys.is_empty() { - state.add(report_missing_recommended_keys( - missing_keys, - runtime_span, - &specification, - )); + state.exceptable_add( + report_missing_recommended_keys( + missing_keys, + runtime_span, + &specification, + ), + SyntaxElement::from(def.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -475,7 +485,11 @@ impl Visitor for RuntimeSectionKeysRule { // problem that can be encountered is if the key is // deprecated. if let KeyKind::Deprecated(replacement) = kind { - state.add(deprecated_runtime_key(&key_name, replacement)); + state.exceptable_add( + deprecated_runtime_key(&key_name, replacement), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } None => { diff --git a/wdl-lint/src/rules/section_order.rs b/wdl-lint/src/rules/section_order.rs index a760b5d9..ee543036 100644 --- a/wdl-lint/src/rules/section_order.rs +++ b/wdl-lint/src/rules/section_order.rs @@ -11,6 +11,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -169,11 +170,15 @@ impl Visitor for SectionOrderingRule { encountered = State::Hints; } _ => { - state.add(task_section_order( - task.name().span(), - task.name().as_str(), - item.syntax().first_token().unwrap().text_range().to_span(), - )); + state.exceptable_add( + task_section_order( + task.name().span(), + task.name().as_str(), + item.syntax().first_token().unwrap().text_range().to_span(), + ), + SyntaxElement::from(task.syntax().clone()), + &self.exceptable_nodes(), + ); break; } } @@ -217,11 +222,15 @@ impl Visitor for SectionOrderingRule { encountered = State::Hints; } _ => { - state.add(workflow_section_order( - workflow.name().span(), - workflow.name().as_str(), - item.syntax().first_token().unwrap().text_range().to_span(), - )); + state.exceptable_add( + workflow_section_order( + workflow.name().span(), + workflow.name().as_str(), + item.syntax().first_token().unwrap().text_range().to_span(), + ), + SyntaxElement::from(workflow.syntax().clone()), + &self.exceptable_nodes(), + ); break; } } diff --git a/wdl-lint/src/rules/snake_case.rs b/wdl-lint/src/rules/snake_case.rs index 77479692..79a1c00e 100644 --- a/wdl-lint/src/rules/snake_case.rs +++ b/wdl-lint/src/rules/snake_case.rs @@ -13,12 +13,14 @@ use wdl_ast::v1::StructDefinition; use wdl_ast::v1::TaskDefinition; use wdl_ast::v1::UnboundDecl; use wdl_ast::v1::WorkflowDefinition; +use wdl_ast::AstNode; use wdl_ast::AstToken; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -70,14 +72,21 @@ fn snake_case(context: Context, name: &str, properly_cased_name: &str, span: Spa /// Checks if the given name is snake case, and if not adds a warning to the /// diagnostics. -fn check_name(context: Context, name: &str, span: Span, diagnostics: &mut Diagnostics) { +fn check_name( + context: Context, + name: &str, + span: Span, + diagnostics: &mut Diagnostics, + element: SyntaxElement, + exceptable_nodes: &Option>, +) { let converter = Converter::new() .remove_boundaries(&[Boundary::DigitLower, Boundary::LowerDigit]) .to_case(Case::Snake); let properly_cased_name = converter.convert(name); if name != properly_cased_name { let warning = snake_case(context, name, &properly_cased_name, span); - diagnostics.add(warning); + diagnostics.exceptable_add(warning, element, exceptable_nodes); } } @@ -214,7 +223,14 @@ impl Visitor for SnakeCaseRule { } let name = task.name(); - check_name(Context::Task, name.as_str(), name.span(), state); + check_name( + Context::Task, + name.as_str(), + name.span(), + state, + SyntaxElement::from(task.syntax().clone()), + &self.exceptable_nodes(), + ); } fn workflow_definition( @@ -228,7 +244,14 @@ impl Visitor for SnakeCaseRule { } let name = workflow.name(); - check_name(Context::Workflow, name.as_str(), name.span(), state); + check_name( + Context::Workflow, + name.as_str(), + name.span(), + state, + SyntaxElement::from(workflow.syntax().clone()), + &self.exceptable_nodes(), + ); } fn bound_decl(&mut self, state: &mut Self::State, reason: VisitReason, decl: &BoundDecl) { @@ -238,7 +261,14 @@ impl Visitor for SnakeCaseRule { let name = decl.name(); let context = self.determine_decl_context(); - check_name(context, name.as_str(), name.span(), state); + check_name( + context, + name.as_str(), + name.span(), + state, + SyntaxElement::from(decl.syntax().clone()), + &self.exceptable_nodes(), + ); } fn unbound_decl(&mut self, state: &mut Self::State, reason: VisitReason, decl: &UnboundDecl) { @@ -248,6 +278,13 @@ impl Visitor for SnakeCaseRule { let name = decl.name(); let context = self.determine_decl_context(); - check_name(context, name.as_str(), name.span(), state); + check_name( + context, + name.as_str(), + name.span(), + state, + SyntaxElement::from(decl.syntax().clone()), + &self.exceptable_nodes(), + ); } } diff --git a/wdl-lint/src/rules/todo.rs b/wdl-lint/src/rules/todo.rs index 99157f88..21cd6fb0 100644 --- a/wdl-lint/src/rules/todo.rs +++ b/wdl-lint/src/rules/todo.rs @@ -7,6 +7,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -70,7 +71,11 @@ impl Visitor for TodoRule { fn comment(&mut self, state: &mut Self::State, comment: &Comment) { for (offset, pattern) in comment.as_str().match_indices(TODO) { - state.add(todo_comment(pattern, comment.span(), offset)) + state.exceptable_add( + todo_comment(pattern, comment.span(), offset), + SyntaxElement::from(comment.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/trailing_comma.rs b/wdl-lint/src/rules/trailing_comma.rs index ba6ccc15..3aa87f23 100755 --- a/wdl-lint/src/rules/trailing_comma.rs +++ b/wdl-lint/src/rules/trailing_comma.rs @@ -10,6 +10,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::ToSpan; use wdl_ast::VisitReason; @@ -117,18 +118,25 @@ impl Visitor for TrailingCommaRule { if let Some(comma) = next_comma { if !comma_is_next { // Comma found, but not next, extraneous trivia - state.add(extraneous_content(Span::new( - usize::from(last_child.syntax().text_range().end()), - usize::from( - comma.text_range().start() - last_child.syntax().text_range().end(), - ), - ))); + state.exceptable_add( + extraneous_content(Span::new( + usize::from(last_child.syntax().text_range().end()), + usize::from( + comma.text_range().start() + - last_child.syntax().text_range().end(), + ), + )), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } else { // No comma found, report missing - state.add(missing_trailing_comma( - last_child.syntax().text_range().to_span(), - )); + state.exceptable_add( + missing_trailing_comma(last_child.syntax().text_range().to_span()), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -152,18 +160,25 @@ impl Visitor for TrailingCommaRule { if let Some(comma) = next_comma { if !comma_is_next { // Comma found, but not next, extraneous trivia - state.add(extraneous_content(Span::new( - usize::from(last_child.syntax().text_range().end()), - usize::from( - comma.text_range().start() - last_child.syntax().text_range().end(), - ), - ))); + state.exceptable_add( + extraneous_content(Span::new( + usize::from(last_child.syntax().text_range().end()), + usize::from( + comma.text_range().start() + - last_child.syntax().text_range().end(), + ), + )), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } else { // No comma found, report missing - state.add(missing_trailing_comma( - last_child.syntax().text_range().to_span(), - )); + state.exceptable_add( + missing_trailing_comma(last_child.syntax().text_range().to_span()), + SyntaxElement::from(item.syntax().clone()), + &self.exceptable_nodes(), + ); } } } @@ -190,15 +205,23 @@ impl Visitor for TrailingCommaRule { let (next_comma, comma_is_next) = find_next_comma(input.syntax()); if let Some(nc) = next_comma { if !comma_is_next { - state.add(extraneous_content(Span::new( - usize::from(input.syntax().text_range().end()), - usize::from(nc.text_range().start() - input.syntax().text_range().end()), - ))); + state.exceptable_add( + extraneous_content(Span::new( + usize::from(input.syntax().text_range().end()), + usize::from( + nc.text_range().start() - input.syntax().text_range().end(), + ), + )), + SyntaxElement::from(call.syntax().clone()), + &self.exceptable_nodes(), + ); } } else { - state.add(missing_trailing_comma( - input.syntax().text_range().to_span(), - )); + state.exceptable_add( + missing_trailing_comma(input.syntax().text_range().to_span()), + SyntaxElement::from(call.syntax().clone()), + &self.exceptable_nodes(), + ); } }); } @@ -223,18 +246,25 @@ impl Visitor for TrailingCommaRule { if let Some(comma) = next_comma { if !comma_is_next { // Comma found, but not next, extraneous trivia - state.add(extraneous_content(Span::new( - usize::from(last_child.text_range().end()), - usize::from( - comma.text_range().start() - - last_child.text_range().end(), - ), - ))); + state.exceptable_add( + extraneous_content(Span::new( + usize::from(last_child.text_range().end()), + usize::from( + comma.text_range().start() + - last_child.text_range().end(), + ), + )), + SyntaxElement::from(l.syntax().clone()), + &self.exceptable_nodes(), + ); } } else { // No comma found, report missing - state - .add(missing_trailing_comma(last_child.text_range().to_span())); + state.exceptable_add( + missing_trailing_comma(last_child.text_range().to_span()), + SyntaxElement::from(l.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/src/rules/unknown_rule.rs b/wdl-lint/src/rules/unknown_rule.rs index f59835f5..10b23189 100644 --- a/wdl-lint/src/rules/unknown_rule.rs +++ b/wdl-lint/src/rules/unknown_rule.rs @@ -81,6 +81,9 @@ impl Visitor for UnknownRule { .map(|rule| rule.id()) .any(|rule_id| rule_id == trimmed) { + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes state.add(unknown_rule( trimmed, Span::new(start + offset, trimmed.len()), diff --git a/wdl-lint/src/rules/whitespace.rs b/wdl-lint/src/rules/whitespace.rs index 69b7e8ae..c2404abe 100644 --- a/wdl-lint/src/rules/whitespace.rs +++ b/wdl-lint/src/rules/whitespace.rs @@ -6,6 +6,7 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; use wdl_ast::VersionStatement; use wdl_ast::VisitReason; @@ -137,12 +138,17 @@ impl Visitor for WhitespaceRule { // If it's the first line, it's considered trailing // The remaining lines will be treated as "blank". if i == 0 { - state.add(trailing_whitespace(Span::new( - span.start() + start, - line.len(), - ))); + state.exceptable_add( + trailing_whitespace(Span::new(span.start() + start, line.len())), + SyntaxElement::from(whitespace.syntax().clone()), + &self.exceptable_nodes(), + ); } else { - state.add(only_whitespace(Span::new(span.start() + start, line.len()))); + state.exceptable_add( + only_whitespace(Span::new(span.start() + start, line.len())), + SyntaxElement::from(whitespace.syntax().clone()), + &self.exceptable_nodes(), + ); } } @@ -157,10 +163,11 @@ impl Visitor for WhitespaceRule { // The "ending newline" rule will catch blank lines at the end of the file if !is_last { if let Some(start) = blank_start { - state.add(more_than_one_blank_line(Span::new( - span.start() + start, - span.len() - start, - ))); + state.exceptable_add( + more_than_one_blank_line(Span::new(span.start() + start, span.len() - start)), + SyntaxElement::from(whitespace.syntax().clone()), + &self.exceptable_nodes(), + ); } } } diff --git a/wdl-lint/tests/lints/except/source.errors b/wdl-lint/tests/lints/except/source.errors index d94d35f6..d64ab702 100644 --- a/wdl-lint/tests/lints/except/source.errors +++ b/wdl-lint/tests/lints/except/source.errors @@ -6,30 +6,6 @@ note[UnknownRule]: unknown lint rule `Unknown` │ = fix: remove the rule from the exception list -warning[PascalCase]: struct name `OK` is not PascalCase - ┌─ tests/lints/except/source.wdl:9:8 - │ -9 │ struct OK { # OK - │ ^^ this name must be PascalCase - │ - = fix: replace `OK` with `Ok` - -warning[SnakeCase]: struct member name `AlsoOk` is not snake_case - ┌─ tests/lints/except/source.wdl:10:9 - │ -10 │ Int AlsoOk # OK - │ ^^^^^^ this name must be snake_case - │ - = fix: replace `AlsoOk` with `also_ok` - -warning[SnakeCase]: struct member name `OKTOO` is not snake_case - ┌─ tests/lints/except/source.wdl:11:9 - │ -11 │ Int OKTOO # OK - │ ^^^^^ this name must be snake_case - │ - = fix: replace `OKTOO` with `oktoo` - note[UnknownRule]: unknown lint rule `AlsoUnknown` ┌─ tests/lints/except/source.wdl:21:26 │ @@ -38,14 +14,6 @@ note[UnknownRule]: unknown lint rule `AlsoUnknown` │ = fix: remove the rule from the exception list -warning[SnakeCase]: struct member name `AlsoOk` is not snake_case - ┌─ tests/lints/except/source.wdl:22:9 - │ -22 │ Int AlsoOk # OK - │ ^^^^^^ this name must be snake_case - │ - = fix: replace `AlsoOk` with `also_ok` - warning[SnakeCase]: struct member name `NotOk` is not snake_case ┌─ tests/lints/except/source.wdl:23:9 │ @@ -54,22 +22,6 @@ warning[SnakeCase]: struct member name `NotOk` is not snake_case │ = fix: replace `NotOk` with `not_ok` -note[MissingMetas]: workflow `test` is missing a `meta` section - ┌─ tests/lints/except/source.wdl:27:10 - │ -27 │ workflow test { - │ ^^^^ this workflow is missing a `meta` section - │ - = fix: add a `meta` section to the workflow - -warning[MissingOutput]: workflow `test` is missing an output section - ┌─ tests/lints/except/source.wdl:27:10 - │ -27 │ workflow test { - │ ^^^^ this workflow is missing an output section - │ - = fix: add an output section to the workflow - warning[DoubleQuotes]: string defined with single quotes ┌─ tests/lints/except/source.wdl:28:18 │ diff --git a/wdl-lint/tests/lints/input-not-sorted/source.errors b/wdl-lint/tests/lints/input-not-sorted/source.errors index b945faed..f621e853 100644 --- a/wdl-lint/tests/lints/input-not-sorted/source.errors +++ b/wdl-lint/tests/lints/input-not-sorted/source.errors @@ -1,11 +1,3 @@ -note[MissingMetas]: struct `Mystruct` is missing both meta and parameter_meta sections - ┌─ tests/lints/input-not-sorted/source.wdl:7:8 - │ -7 │ struct Mystruct { - │ ^^^^^^^^ this struct is missing both meta and parameter_meta sections - │ - = fix: add meta and parameter_meta sections to the struct - warning[InputSorting]: input not sorted ┌─ tests/lints/input-not-sorted/source.wdl:40:5 │ diff --git a/wdl-lint/tests/lints/line-width/source.errors b/wdl-lint/tests/lints/line-width/source.errors index 1af5dddf..3b77fdec 100755 --- a/wdl-lint/tests/lints/line-width/source.errors +++ b/wdl-lint/tests/lints/line-width/source.errors @@ -14,22 +14,6 @@ note[LineWidth]: line exceeds maximum width of 90 │ = fix: split the line into multiple lines -note[LineWidth]: line exceeds maximum width of 90 - ┌─ tests/lints/line-width/source.wdl:33:1 - │ -33 │ this is going to be a really long line that is not going to trip up our maximum line lint because it is excepted / - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: split the line into multiple lines - -note[LineWidth]: line exceeds maximum width of 90 - ┌─ tests/lints/line-width/source.wdl:35:1 - │ -35 │ this line is also going to be very very very long but it will also not trip up our maximum line line because it is excepted / - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: split the line into multiple lines - note[LineWidth]: line exceeds maximum width of 90 ┌─ tests/lints/line-width/source.wdl:49:1 │ diff --git a/wdl-lint/tests/lints/nonmatching-output/source.errors b/wdl-lint/tests/lints/nonmatching-output/source.errors index 774cfb87..64bdc807 100644 --- a/wdl-lint/tests/lints/nonmatching-output/source.errors +++ b/wdl-lint/tests/lints/nonmatching-output/source.errors @@ -79,30 +79,6 @@ warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `garply │ = fix: ensure the output exists or remove the `v` key from `meta.outputs` -warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `garply2` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:120:13 - │ -120 │ v: "v" - │ ^^^^^^ - │ - = fix: ensure the output exists or remove the `v` key from `meta.outputs` - -warning[NonmatchingOutput]: output `v` is missing from `meta.outputs` section in task `waldo` - ┌─ tests/lints/nonmatching-output/source.wdl:143:9 - │ -143 │ String v = "!" - │ ^^^^^^^^^^^^^^ - │ - = fix: add a description of output `v` to documentation in `meta.outputs` - -warning[NonmatchingOutput]: output `v` is missing from `meta.outputs` section in task `waldo2` - ┌─ tests/lints/nonmatching-output/source.wdl:160:9 - │ -160 │ String v = "!" - │ ^^^^^^^^^^^^^^ - │ - = fix: add a description of output `v` to documentation in `meta.outputs` - warning[NonmatchingOutput]: `s` appears in `outputs` section of the task `quuux` but is not a declared `output` ┌─ tests/lints/nonmatching-output/source.wdl:168:13 │ diff --git a/wdl-lint/tests/lints/pascal-case/source.errors b/wdl-lint/tests/lints/pascal-case/source.errors index 9bd80c1f..6df215f9 100644 --- a/wdl-lint/tests/lints/pascal-case/source.errors +++ b/wdl-lint/tests/lints/pascal-case/source.errors @@ -22,11 +22,3 @@ warning[PascalCase]: struct name `This_Is_Bad_Too` is not PascalCase │ = fix: replace `This_Is_Bad_Too` with `ThisIsBadToo` -warning[PascalCase]: struct name `excepted_name` is not PascalCase - ┌─ tests/lints/pascal-case/source.wdl:22:8 - │ -22 │ struct excepted_name { - │ ^^^^^^^^^^^^^ this name must be PascalCase - │ - = fix: replace `excepted_name` with `ExceptedName` - diff --git a/wdl-lint/tests/lints/snake-case/source.errors b/wdl-lint/tests/lints/snake-case/source.errors index 83ba4ae3..04858c21 100644 --- a/wdl-lint/tests/lints/snake-case/source.errors +++ b/wdl-lint/tests/lints/snake-case/source.errors @@ -46,11 +46,3 @@ warning[SnakeCase]: struct member name `bAdFiElD` is not snake_case │ = fix: replace `bAdFiElD` with `b_ad_fi_el_d` -warning[SnakeCase]: struct member name `OK` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:62:12 - │ -62 │ String OK - │ ^^ this name must be snake_case - │ - = fix: replace `OK` with `ok` - diff --git a/wdl-lint/tests/lints/todo/source.errors b/wdl-lint/tests/lints/todo/source.errors index 8d71b7a5..5e98e412 100755 --- a/wdl-lint/tests/lints/todo/source.errors +++ b/wdl-lint/tests/lints/todo/source.errors @@ -22,19 +22,3 @@ note[Todo]: remaining `TODO` item found │ = fix: implement this todo item and remove the `TODO` statement -note[Todo]: remaining `TODO` item found - ┌─ tests/lints/todo/source.wdl:14:11 - │ -14 │ # TODO: this should NOT be flagged either - │ ^^^^ - │ - = fix: implement this todo item and remove the `TODO` statement - -note[Todo]: remaining `TODO` item found - ┌─ tests/lints/todo/source.wdl:21:7 - │ -21 │ # TODO: This should NOT be flagged as well. - │ ^^^^ - │ - = fix: implement this todo item and remove the `TODO` statement - From 6f7d6fa8bcbffb2f83da3bf3600ed30d6cbf5c49 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 10 Sep 2024 17:10:37 -0400 Subject: [PATCH 07/30] Update Arena.toml --- Arena.toml | 53 ++++------------------------------------------------- 1 file changed, 4 insertions(+), 49 deletions(-) diff --git a/Arena.toml b/Arena.toml index 0773ffce..6be47bbc 100644 --- a/Arena.toml +++ b/Arena.toml @@ -1710,11 +1710,6 @@ document = "stjudecloud/workflows:/data_structures/read_group.wdl" message = "read_group.wdl:107:20: note[ContainerValue]: container URI uses a mutable tag" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/data_structures/read_group.wdl/#L107" -[[diagnostics]] -document = "stjudecloud/workflows:/data_structures/read_group.wdl" -message = "read_group.wdl:134:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/data_structures/read_group.wdl/#L134" - [[diagnostics]] document = "stjudecloud/workflows:/data_structures/read_group.wdl" message = "read_group.wdl:159:20: note[ContainerValue]: container URI uses a mutable tag" @@ -1747,8 +1742,8 @@ permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4 [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" -message = "arriba.wdl:147:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L147" +message = "arriba.wdl:148:1: note[LineWidth]: line exceeds maximum width of 90" +permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L148" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" @@ -2135,11 +2130,6 @@ document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:96:20: note[ContainerValue]: container URI uses a mutable tag" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L96" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/gatk4.wdl" -message = "gatk4.wdl:127:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L127" - [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:12:13: note[TrailingComma]: item missing trailing comma" @@ -2160,11 +2150,6 @@ document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:164:10: note[BlankLinesBetweenElements]: extra blank line(s) found" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L164" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/gatk4.wdl" -message = "gatk4.wdl:194:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L194" - [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:216:20: note[ContainerValue]: container URI uses a mutable tag" @@ -2185,11 +2170,6 @@ document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:246:13: note[TrailingComma]: item missing trailing comma" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L246" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/gatk4.wdl" -message = "gatk4.wdl:280:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L280" - [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:302:20: note[ContainerValue]: container URI uses a mutable tag" @@ -2260,11 +2240,6 @@ document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:135:20: note[ContainerValue]: container URI uses a mutable tag" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L135" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/htseq.wdl" -message = "htseq.wdl:163:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L163" - [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:19:13: note[TrailingComma]: item missing trailing comma" @@ -2570,11 +2545,6 @@ document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:223:13: note[TrailingComma]: item missing trailing comma" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L223" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/ngsderive.wdl" -message = "ngsderive.wdl:239:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L239" - [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:25:13: note[TrailingComma]: item missing trailing comma" @@ -3830,11 +3800,6 @@ document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:511:13: note[TrailingComma]: item missing trailing comma" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L511" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/star.wdl" -message = "star.wdl:632:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L632" - [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:654:17: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" @@ -3945,11 +3910,6 @@ document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:425:20: note[ContainerValue]: container URI uses a mutable tag" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L425" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/util.wdl" -message = "util.wdl:458:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L458" - [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:45:20: note[ContainerValue]: container URI uses a mutable tag" @@ -3970,11 +3930,6 @@ document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:686:20: note[ContainerValue]: container URI uses a mutable tag" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L686" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/util.wdl" -message = "util.wdl:713:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L713" - [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:764:20: note[ContainerValue]: container URI uses a mutable tag" @@ -4222,8 +4177,8 @@ permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4 [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" -message = "quality-check-standard.wdl:111:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L111" +message = "quality-check-standard.wdl:112:1: note[LineWidth]: line exceeds maximum width of 90" +permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L112" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" From a94d757036722da773b5f4399531f44967c4a13f Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Wed, 11 Sep 2024 13:58:10 -0400 Subject: [PATCH 08/30] feat: MisplacedLintDirective rule --- wdl-grammar/src/tree.rs | 170 ++++++++++++++++++ wdl-lint/src/lib.rs | 1 + wdl-lint/src/rules.rs | 2 + .../src/rules/misplaced_lint_directive.rs | 117 ++++++++++++ .../tests/lints/double-quotes/source.errors | 8 + .../lints/nonmatching-output/source.errors | 8 + .../tests/lints/unknown_rule/source.errors | 8 + 7 files changed, 314 insertions(+) create mode 100644 wdl-lint/src/rules/misplaced_lint_directive.rs diff --git a/wdl-grammar/src/tree.rs b/wdl-grammar/src/tree.rs index 31e5013a..0d01f896 100644 --- a/wdl-grammar/src/tree.rs +++ b/wdl-grammar/src/tree.rs @@ -369,6 +369,176 @@ impl From for rowan::SyntaxKind { } } +impl SyntaxKind { + /// Describes the syntax kind. + pub fn describe(&self) -> &'static str { + match self { + SyntaxKind::Unknown => unreachable!(), + SyntaxKind::Unparsed => unreachable!(), + SyntaxKind::Whitespace => "whitespace", + SyntaxKind::Comment => "comment", + SyntaxKind::Version => "version", + SyntaxKind::Float => "float", + SyntaxKind::Integer => "integer", + SyntaxKind::Ident => "identifier", + SyntaxKind::SingleQuote => "single quote", + SyntaxKind::DoubleQuote => "double quote", + SyntaxKind::OpenHeredoc => "open heredoc", + SyntaxKind::CloseHeredoc => "close heredoc", + SyntaxKind::ArrayTypeKeyword => "`Array` type keyword", + SyntaxKind::BooleanTypeKeyword => "`Boolean` type keyword", + SyntaxKind::FileTypeKeyword => "`File` type keyword", + SyntaxKind::FloatTypeKeyword => "`Float` type keyword", + SyntaxKind::IntTypeKeyword => "`Int` type keyword", + SyntaxKind::MapTypeKeyword => "`Map` type keyword", + SyntaxKind::ObjectTypeKeyword => "`Object` type keyword", + SyntaxKind::PairTypeKeyword => "`Pair` type keyword", + SyntaxKind::StringTypeKeyword => "`String` type keyword", + SyntaxKind::AfterKeyword => "`after` keyword", + SyntaxKind::AliasKeyword => "`alias` keyword", + SyntaxKind::AsKeyword => "`as` keyword", + SyntaxKind::CallKeyword => "`call` keyword", + SyntaxKind::CommandKeyword => "`command` keyword", + SyntaxKind::ElseKeyword => "`else` keyword", + SyntaxKind::FalseKeyword => "`false` keyword", + SyntaxKind::IfKeyword => "`if` keyword", + SyntaxKind::InKeyword => "`in` keyword", + SyntaxKind::ImportKeyword => "`import` keyword", + SyntaxKind::InputKeyword => "`input` keyword", + SyntaxKind::MetaKeyword => "`meta` keyword", + SyntaxKind::NoneKeyword => "`None` keyword", + SyntaxKind::NullKeyword => "`null` keyword", + SyntaxKind::ObjectKeyword => "`object` keyword", + SyntaxKind::OutputKeyword => "`output` keyword", + SyntaxKind::ParameterMetaKeyword => "`parameter_meta` keyword", + SyntaxKind::RuntimeKeyword => "`runtime` keyword", + SyntaxKind::ScatterKeyword => "`scatter` keyword", + SyntaxKind::StructKeyword => "`struct` keyword", + SyntaxKind::TaskKeyword => "`task` keyword", + SyntaxKind::ThenKeyword => "`then` keyword", + SyntaxKind::TrueKeyword => "`true` keyword", + SyntaxKind::VersionKeyword => "`version` keyword", + SyntaxKind::WorkflowKeyword => "`workflow` keyword", + SyntaxKind::DirectoryTypeKeyword => "`Directory` type keyword", + SyntaxKind::HintsKeyword => "`hints` keyword", + SyntaxKind::RequirementsKeyword => "`requirements` keyword", + SyntaxKind::OpenBrace => "`{` symbol", + SyntaxKind::CloseBrace => "`}` symbol", + SyntaxKind::OpenBracket => "`[` symbol", + SyntaxKind::CloseBracket => "`]` symbol", + SyntaxKind::Assignment => "`=` symbol", + SyntaxKind::Colon => "`:` symbol", + SyntaxKind::Comma => "`,` symbol", + SyntaxKind::OpenParen => "`(` symbol", + SyntaxKind::CloseParen => "`)` symbol", + SyntaxKind::QuestionMark => "`?` symbol", + SyntaxKind::Exclamation => "`!` symbol", + SyntaxKind::Plus => "`+` symbol", + SyntaxKind::Minus => "`-` symbol", + SyntaxKind::LogicalOr => "`||` symbol", + SyntaxKind::LogicalAnd => "`&&` symbol", + SyntaxKind::Asterisk => "`*` symbol", + SyntaxKind::Exponentiation => "`**` symbol", + SyntaxKind::Slash => "`/` symbol", + SyntaxKind::Percent => "`%` symbol", + SyntaxKind::Equal => "`==` symbol", + SyntaxKind::NotEqual => "`!=` symbol", + SyntaxKind::LessEqual => "`<=` symbol", + SyntaxKind::GreaterEqual => "`>=` symbol", + SyntaxKind::Less => "`<` symbol", + SyntaxKind::Greater => "`>` symbol", + SyntaxKind::Dot => "`.` symbol", + SyntaxKind::LiteralStringText => "literal string text", + SyntaxKind::LiteralCommandText => "literal command text", + SyntaxKind::PlaceholderOpen => "placeholder open", + SyntaxKind::Abandoned => unreachable!(), + SyntaxKind::RootNode => "root node", + SyntaxKind::VersionStatementNode => "version statement", + SyntaxKind::ImportStatementNode => "import statement", + SyntaxKind::ImportAliasNode => "import alias", + SyntaxKind::StructDefinitionNode => "struct definition", + SyntaxKind::TaskDefinitionNode => "task definition", + SyntaxKind::WorkflowDefinitionNode => "workflow definition", + SyntaxKind::UnboundDeclNode => "declaration without assignment", + SyntaxKind::BoundDeclNode => "declaration with assignment", + SyntaxKind::InputSectionNode => "input section", + SyntaxKind::OutputSectionNode => "output section", + SyntaxKind::CommandSectionNode => "command section", + SyntaxKind::RequirementsSectionNode => "requirements section", + SyntaxKind::RequirementsItemNode => "requirements item", + SyntaxKind::HintsSectionNode => "hints section", + SyntaxKind::HintsItemNode => "hints item", + SyntaxKind::RuntimeSectionNode => "runtime section", + SyntaxKind::RuntimeItemNode => "runtime item", + SyntaxKind::PrimitiveTypeNode => "primitive type", + SyntaxKind::MapTypeNode => "map type", + SyntaxKind::ArrayTypeNode => "array type", + SyntaxKind::PairTypeNode => "pair type", + SyntaxKind::ObjectTypeNode => "object type", + SyntaxKind::TypeRefNode => "type reference", + SyntaxKind::MetadataSectionNode => "metadata section", + SyntaxKind::ParameterMetadataSectionNode => "parameter metadata section", + SyntaxKind::MetadataObjectItemNode => "metadata object item", + SyntaxKind::MetadataObjectNode => "metadata object", + SyntaxKind::MetadataArrayNode => "metadata array", + SyntaxKind::LiteralIntegerNode => "literal integer", + SyntaxKind::LiteralFloatNode => "literal float", + SyntaxKind::LiteralBooleanNode => "literal boolean", + SyntaxKind::LiteralNoneNode => "literal `None`", + SyntaxKind::LiteralNullNode => "literal null", + SyntaxKind::LiteralStringNode => "literal string", + SyntaxKind::LiteralPairNode => "literal pair", + SyntaxKind::LiteralArrayNode => "literal array", + SyntaxKind::LiteralMapNode => "literal map", + SyntaxKind::LiteralMapItemNode => "literal map item", + SyntaxKind::LiteralObjectNode => "literal object", + SyntaxKind::LiteralObjectItemNode => "literal object item", + SyntaxKind::LiteralStructNode => "literal struct", + SyntaxKind::LiteralStructItemNode => "literal struct item", + SyntaxKind::LiteralHintsNode => "literal hints", + SyntaxKind::LiteralHintsItemNode => "literal hints item", + SyntaxKind::LiteralInputNode => "literal input", + SyntaxKind::LiteralInputItemNode => "literal input item", + SyntaxKind::LiteralOutputNode => "literal output", + SyntaxKind::LiteralOutputItemNode => "literal output item", + SyntaxKind::ParenthesizedExprNode => "parenthesized expression", + SyntaxKind::NameRefNode => "name reference", + SyntaxKind::IfExprNode => "`if` expression", + SyntaxKind::LogicalNotExprNode => "logical not expression", + SyntaxKind::NegationExprNode => "negation expression", + SyntaxKind::LogicalOrExprNode => "logical OR expression", + SyntaxKind::LogicalAndExprNode => "logical AND expression", + SyntaxKind::EqualityExprNode => "equality expression", + SyntaxKind::InequalityExprNode => "inequality expression", + SyntaxKind::LessExprNode => "less than expression", + SyntaxKind::LessEqualExprNode => "less than or equal to expression", + SyntaxKind::GreaterExprNode => "greater than expression", + SyntaxKind::GreaterEqualExprNode => "greater than or equal to expression", + SyntaxKind::AdditionExprNode => "addition expression", + SyntaxKind::SubtractionExprNode => "subtraction expression", + SyntaxKind::MultiplicationExprNode => "multiplication expression", + SyntaxKind::DivisionExprNode => "division expression", + SyntaxKind::ModuloExprNode => "modulo expression", + SyntaxKind::ExponentiationExprNode => "exponentiation expression", + SyntaxKind::CallExprNode => "call expression", + SyntaxKind::IndexExprNode => "index expression", + SyntaxKind::AccessExprNode => "access expression", + SyntaxKind::PlaceholderNode => "placeholder", + SyntaxKind::PlaceholderSepOptionNode => "placeholder `sep` option", + SyntaxKind::PlaceholderDefaultOptionNode => "placeholder `default` option", + SyntaxKind::PlaceholderTrueFalseOptionNode => "placeholder `true`/`false` option", + SyntaxKind::ConditionalStatementNode => "conditional statement", + SyntaxKind::ScatterStatementNode => "scatter statement", + SyntaxKind::CallStatementNode => "call statement", + SyntaxKind::CallTargetNode => "call target", + SyntaxKind::CallAliasNode => "call alias", + SyntaxKind::CallAfterNode => "call `after` clause", + SyntaxKind::CallInputItemNode => "call input item", + SyntaxKind::MAX => unreachable!(), + } + } +} + /// Represents the Workflow Definition Language (WDL). #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct WorkflowDescriptionLanguage; diff --git a/wdl-lint/src/lib.rs b/wdl-lint/src/lib.rs index a90bd8f2..623b4f72 100644 --- a/wdl-lint/src/lib.rs +++ b/wdl-lint/src/lib.rs @@ -112,6 +112,7 @@ pub fn rules() -> Vec> { Box::::default(), Box::::default(), Box::::default(), + Box::::default(), ]; // Ensure all the rule ids are unique and pascal case diff --git a/wdl-lint/src/rules.rs b/wdl-lint/src/rules.rs index 25c021f4..1ff57605 100644 --- a/wdl-lint/src/rules.rs +++ b/wdl-lint/src/rules.rs @@ -21,6 +21,7 @@ mod input_not_sorted; mod key_value_pairs; mod line_width; mod matching_parameter_meta; +mod misplaced_lint_directive; mod missing_metas; mod missing_output; mod missing_requirements; @@ -59,6 +60,7 @@ pub use input_not_sorted::*; pub use key_value_pairs::*; pub use line_width::*; pub use matching_parameter_meta::*; +pub use misplaced_lint_directive::*; pub use missing_metas::*; pub use missing_output::*; pub use missing_requirements::*; diff --git a/wdl-lint/src/rules/misplaced_lint_directive.rs b/wdl-lint/src/rules/misplaced_lint_directive.rs new file mode 100644 index 00000000..675b4311 --- /dev/null +++ b/wdl-lint/src/rules/misplaced_lint_directive.rs @@ -0,0 +1,117 @@ +//! A lint rule for flagging misplaced lint directives. + +use wdl_ast::AstToken; +use wdl_ast::Comment; +use wdl_ast::Diagnostic; +use wdl_ast::Diagnostics; +use wdl_ast::Document; +use wdl_ast::Span; +use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; +use wdl_ast::VisitReason; +use wdl_ast::Visitor; +use wdl_ast::EXCEPT_COMMENT_PREFIX; + +use crate::rules; +use crate::Rule; +use crate::Tag; +use crate::TagSet; + +/// The identifier for the unknown rule rule. +const ID: &str = "MisplacedLintDirective"; + +/// Creates an "unknown rule" diagnostic. +fn misplaced_lint_directive(id: &str, span: Span, exceptable_nodes: &[SyntaxKind]) -> Diagnostic { + let locations = exceptable_nodes + .iter() + .map(|node| node.describe()) + .collect::>() + .join(", "); + + Diagnostic::note(format!("lint directive `{id}` above incorrect location")) + .with_rule(ID) + .with_label("cannot make an exception for this rule", span) + .with_fix(format!( + "move the lint directive to a valid location. Valid locations for this rule are \ + above: {locations}" + )) +} + +/// Detects unknown rules within lint directives. +#[derive(Default, Debug, Clone, Copy)] +pub struct MisplacedLintDirective; + +impl Rule for MisplacedLintDirective { + fn id(&self) -> &'static str { + ID + } + + fn description(&self) -> &'static str { + "Flags misplaced lint directives which will have no effect." + } + + fn explanation(&self) -> &'static str { + "TODO" + } + + fn tags(&self) -> TagSet { + TagSet::new(&[Tag::Clarity, Tag::Correctness]) + } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![SyntaxKind::VersionStatementNode]) + } +} + +impl Visitor for MisplacedLintDirective { + type State = Diagnostics; + + fn document(&mut self, _: &mut Self::State, _: VisitReason, _: &Document, _: SupportedVersion) { + // This is intentionally empty, as this rule has no state. + } + + fn comment(&mut self, state: &mut Self::State, comment: &Comment) { + if let Some(ids) = comment.as_str().strip_prefix(EXCEPT_COMMENT_PREFIX) { + let start: usize = comment.span().start(); + let mut offset = EXCEPT_COMMENT_PREFIX.len(); + + let excepted_element = comment + .syntax() + .siblings_with_tokens(rowan::Direction::Next) + .find_map(|s| { + if s.kind() == SyntaxKind::Whitespace || s.kind() == SyntaxKind::Comment { + None + } else { + Some(s) + } + }); + + for id in ids.split(',') { + // First trim the start so we can determine how much whitespace was removed + let trimmed_start = id.trim_start(); + // Next trim the end + let trimmed: &str = trimmed_start.trim_end(); + + // Update the offset to account for the whitespace that was removed + offset += id.len() - trimmed.len(); + + if let Some(rule) = rules().iter().find(|r| r.id() == trimmed) { + if let Some(elem) = &excepted_element { + if let Some(exceptable_nodes) = rule.exceptable_nodes() { + if !exceptable_nodes.contains(&elem.kind()) { + state.add(misplaced_lint_directive( + trimmed, + Span::new(start + offset, trimmed.len()), + &exceptable_nodes, + )); + } + } + } + } + + // Update the offset to account for the rule id and comma + offset += trimmed.len() + 1; + } + } + } +} diff --git a/wdl-lint/tests/lints/double-quotes/source.errors b/wdl-lint/tests/lints/double-quotes/source.errors index 0e101cd8..141270f4 100644 --- a/wdl-lint/tests/lints/double-quotes/source.errors +++ b/wdl-lint/tests/lints/double-quotes/source.errors @@ -26,6 +26,14 @@ warning[DoubleQuotes]: string defined with single quotes │ = fix: change the single quotes to double quotes +note[MisplacedLintDirective]: lint directive `DoubleQuotes` above incorrect location + ┌─ tests/lints/double-quotes/source.wdl:19:16 + │ +19 │ #@ except: DoubleQuotes + │ ^^^^^^^^^^^^ cannot make an exception for this rule + │ + = fix: move the lint directive to a valid location. Valid locations for this rule are above: version statement, task definition, workflow definition, struct definition, metadata section, parameter metadata section, literal string + warning[DoubleQuotes]: string defined with single quotes ┌─ tests/lints/double-quotes/source.wdl:21:9 │ diff --git a/wdl-lint/tests/lints/nonmatching-output/source.errors b/wdl-lint/tests/lints/nonmatching-output/source.errors index 64bdc807..5db95cf3 100644 --- a/wdl-lint/tests/lints/nonmatching-output/source.errors +++ b/wdl-lint/tests/lints/nonmatching-output/source.errors @@ -71,6 +71,14 @@ warning[NonmatchingOutput]: output `v` is missing from `meta.outputs` section in │ = fix: add a description of output `v` to documentation in `meta.outputs` +note[MisplacedLintDirective]: lint directive `NonmatchingOutput` above incorrect location + ┌─ tests/lints/nonmatching-output/source.wdl:102:24 + │ +102 │ #@ except: NonmatchingOutput + │ ^^^^^^^^^^^^^^^^^ cannot make an exception for this rule + │ + = fix: move the lint directive to a valid location. Valid locations for this rule are above: version statement, task definition, workflow definition + warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `garply` but is not a declared `output` ┌─ tests/lints/nonmatching-output/source.wdl:103:13 │ diff --git a/wdl-lint/tests/lints/unknown_rule/source.errors b/wdl-lint/tests/lints/unknown_rule/source.errors index 28f64144..91cbc044 100644 --- a/wdl-lint/tests/lints/unknown_rule/source.errors +++ b/wdl-lint/tests/lints/unknown_rule/source.errors @@ -6,6 +6,14 @@ note[UnknownRule]: unknown lint rule `ThisIsNotARealRule` │ = fix: remove the rule from the exception list +note[MisplacedLintDirective]: lint directive `DescriptionMissing` above incorrect location + ┌─ tests/lints/unknown_rule/source.wdl:3:32 + │ +3 │ #@ except: ThisIsNotARealRule, DescriptionMissing + │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule + │ + = fix: move the lint directive to a valid location. Valid locations for this rule are above: version statement, metadata section + note[DescriptionMissing]: workflow `test` is missing a description key ┌─ tests/lints/unknown_rule/source.wdl:5:3 │ From 59c741ed1f8a42dd29b7f13190376690269c39e4 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Wed, 11 Sep 2024 14:22:38 -0400 Subject: [PATCH 09/30] Update util.rs --- wdl-lint/src/util.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wdl-lint/src/util.rs b/wdl-lint/src/util.rs index 8ffa5282..7b2e4fbc 100644 --- a/wdl-lint/src/util.rs +++ b/wdl-lint/src/util.rs @@ -11,7 +11,7 @@ pub fn lines_with_offset(s: &str) -> impl Iterator let start = offset; loop { - match s[offset..].find(|c| c == '\r' || c == '\n') { + match s[offset..].find(['\r', '\n']) { Some(i) => { let end = offset + i; offset = end + 1; From 4d304a3fdcf49043a1015c73c872c5f0300bc408 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Wed, 11 Sep 2024 15:06:32 -0400 Subject: [PATCH 10/30] fix: multiple fixes --- Arena.toml | 10 ------- wdl-lint/src/rules/double_quotes.rs | 1 + wdl-lint/src/rules/line_width.rs | 5 +++- .../src/rules/misplaced_lint_directive.rs | 30 ++++++++++++++----- .../tests/lints/double-quotes/source.errors | 16 ---------- .../lints/nonmatching-output/source.errors | 6 ++-- .../tests/lints/unknown_rule/source.errors | 18 +++++++---- 7 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Arena.toml b/Arena.toml index 6be47bbc..dcffb537 100644 --- a/Arena.toml +++ b/Arena.toml @@ -1740,11 +1740,6 @@ document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:142:79: note[TrailingComma]: item missing trailing comma" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L142" -[[diagnostics]] -document = "stjudecloud/workflows:/tools/arriba.wdl" -message = "arriba.wdl:148:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L148" - [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:22:13: note[TrailingComma]: item missing trailing comma" @@ -4175,11 +4170,6 @@ document = "stjudecloud/workflows:/workflows/qc/markdups-post.wdl" message = "markdups-post.wdl:25:13: note[TrailingComma]: item missing trailing comma" permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/markdups-post.wdl/#L25" -[[diagnostics]] -document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" -message = "quality-check-standard.wdl:112:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L112" - [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:181:9: note[TrailingComma]: item missing trailing comma" diff --git a/wdl-lint/src/rules/double_quotes.rs b/wdl-lint/src/rules/double_quotes.rs index f1c5aa60..406fd657 100644 --- a/wdl-lint/src/rules/double_quotes.rs +++ b/wdl-lint/src/rules/double_quotes.rs @@ -61,6 +61,7 @@ impl Rule for DoubleQuotesRule { SyntaxKind::StructDefinitionNode, SyntaxKind::MetadataSectionNode, SyntaxKind::ParameterMetadataSectionNode, + SyntaxKind::BoundDeclNode, SyntaxKind::LiteralStringNode, ]) } diff --git a/wdl-lint/src/rules/line_width.rs b/wdl-lint/src/rules/line_width.rs index ab6b7daf..6ec14d4a 100644 --- a/wdl-lint/src/rules/line_width.rs +++ b/wdl-lint/src/rules/line_width.rs @@ -139,7 +139,10 @@ impl Visitor for LineWidthRule { state, whitespace.as_str(), whitespace.span().start(), - SyntaxElement::from(whitespace.syntax().clone()), + whitespace + .syntax() + .prev_sibling_or_token() + .unwrap_or(SyntaxElement::from(whitespace.syntax().clone())), &self.exceptable_nodes(), ); } diff --git a/wdl-lint/src/rules/misplaced_lint_directive.rs b/wdl-lint/src/rules/misplaced_lint_directive.rs index 675b4311..9fa739e4 100644 --- a/wdl-lint/src/rules/misplaced_lint_directive.rs +++ b/wdl-lint/src/rules/misplaced_lint_directive.rs @@ -7,7 +7,9 @@ use wdl_ast::Diagnostics; use wdl_ast::Document; use wdl_ast::Span; use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxElement; use wdl_ast::SyntaxKind; +use wdl_ast::ToSpan; use wdl_ast::VisitReason; use wdl_ast::Visitor; use wdl_ast::EXCEPT_COMMENT_PREFIX; @@ -21,20 +23,31 @@ use crate::TagSet; const ID: &str = "MisplacedLintDirective"; /// Creates an "unknown rule" diagnostic. -fn misplaced_lint_directive(id: &str, span: Span, exceptable_nodes: &[SyntaxKind]) -> Diagnostic { +fn misplaced_lint_directive( + id: &str, + span: Span, + wrong_element: &SyntaxElement, + exceptable_nodes: &[SyntaxKind], +) -> Diagnostic { let locations = exceptable_nodes .iter() .map(|node| node.describe()) .collect::>() .join(", "); - Diagnostic::note(format!("lint directive `{id}` above incorrect location")) - .with_rule(ID) - .with_label("cannot make an exception for this rule", span) - .with_fix(format!( - "move the lint directive to a valid location. Valid locations for this rule are \ - above: {locations}" - )) + Diagnostic::note(format!( + "lint directive `{id}` has no effect above: {elem}", + elem = wrong_element.kind().describe() + )) + .with_rule(ID) + .with_label("cannot make an exception for this rule", span) + .with_label( + "invalid element for this lint directive", + wrong_element.text_range().to_span(), + ) + .with_fix(format!( + "valid locations for this directive are above: {locations}" + )) } /// Detects unknown rules within lint directives. @@ -102,6 +115,7 @@ impl Visitor for MisplacedLintDirective { state.add(misplaced_lint_directive( trimmed, Span::new(start + offset, trimmed.len()), + elem, &exceptable_nodes, )); } diff --git a/wdl-lint/tests/lints/double-quotes/source.errors b/wdl-lint/tests/lints/double-quotes/source.errors index 141270f4..254bbb74 100644 --- a/wdl-lint/tests/lints/double-quotes/source.errors +++ b/wdl-lint/tests/lints/double-quotes/source.errors @@ -26,19 +26,3 @@ warning[DoubleQuotes]: string defined with single quotes │ = fix: change the single quotes to double quotes -note[MisplacedLintDirective]: lint directive `DoubleQuotes` above incorrect location - ┌─ tests/lints/double-quotes/source.wdl:19:16 - │ -19 │ #@ except: DoubleQuotes - │ ^^^^^^^^^^^^ cannot make an exception for this rule - │ - = fix: move the lint directive to a valid location. Valid locations for this rule are above: version statement, task definition, workflow definition, struct definition, metadata section, parameter metadata section, literal string - -warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/double-quotes/source.wdl:21:9 - │ -21 │ 'this string is excepted' - │ ^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: change the single quotes to double quotes - diff --git a/wdl-lint/tests/lints/nonmatching-output/source.errors b/wdl-lint/tests/lints/nonmatching-output/source.errors index 5db95cf3..b88a5bae 100644 --- a/wdl-lint/tests/lints/nonmatching-output/source.errors +++ b/wdl-lint/tests/lints/nonmatching-output/source.errors @@ -71,13 +71,15 @@ warning[NonmatchingOutput]: output `v` is missing from `meta.outputs` section in │ = fix: add a description of output `v` to documentation in `meta.outputs` -note[MisplacedLintDirective]: lint directive `NonmatchingOutput` above incorrect location +note[MisplacedLintDirective]: lint directive `NonmatchingOutput` has no effect above: metadata object item ┌─ tests/lints/nonmatching-output/source.wdl:102:24 │ 102 │ #@ except: NonmatchingOutput │ ^^^^^^^^^^^^^^^^^ cannot make an exception for this rule +103 │ v: "v" + │ ------ invalid element for this lint directive │ - = fix: move the lint directive to a valid location. Valid locations for this rule are above: version statement, task definition, workflow definition + = fix: valid locations for this directive are above: version statement, task definition, workflow definition warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `garply` but is not a declared `output` ┌─ tests/lints/nonmatching-output/source.wdl:103:13 diff --git a/wdl-lint/tests/lints/unknown_rule/source.errors b/wdl-lint/tests/lints/unknown_rule/source.errors index 91cbc044..1fbbce37 100644 --- a/wdl-lint/tests/lints/unknown_rule/source.errors +++ b/wdl-lint/tests/lints/unknown_rule/source.errors @@ -6,13 +6,19 @@ note[UnknownRule]: unknown lint rule `ThisIsNotARealRule` │ = fix: remove the rule from the exception list -note[MisplacedLintDirective]: lint directive `DescriptionMissing` above incorrect location +note[MisplacedLintDirective]: lint directive `DescriptionMissing` has no effect above: workflow definition ┌─ tests/lints/unknown_rule/source.wdl:3:32 - │ -3 │ #@ except: ThisIsNotARealRule, DescriptionMissing - │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule - │ - = fix: move the lint directive to a valid location. Valid locations for this rule are above: version statement, metadata section + │ +3 │ #@ except: ThisIsNotARealRule, DescriptionMissing + │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule +4 │ ╭ workflow test { +5 │ │ meta {} +6 │ │ +7 │ │ output {} +8 │ │ } + │ ╰─' invalid element for this lint directive + │ + = fix: valid locations for this directive are above: version statement, metadata section note[DescriptionMissing]: workflow `test` is missing a description key ┌─ tests/lints/unknown_rule/source.wdl:5:3 From afc8e3153a346117c0f30cb704d4b73fd8317eb1 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Wed, 11 Sep 2024 15:36:50 -0400 Subject: [PATCH 11/30] docs: explanation text --- wdl-lint/src/rules/misplaced_lint_directive.rs | 4 +++- wdl-lint/src/rules/unknown_rule.rs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wdl-lint/src/rules/misplaced_lint_directive.rs b/wdl-lint/src/rules/misplaced_lint_directive.rs index 9fa739e4..db7f0ecc 100644 --- a/wdl-lint/src/rules/misplaced_lint_directive.rs +++ b/wdl-lint/src/rules/misplaced_lint_directive.rs @@ -64,7 +64,9 @@ impl Rule for MisplacedLintDirective { } fn explanation(&self) -> &'static str { - "TODO" + "When writing WDL, lint directives are used to suppress certain rules. If a lint directive is \ + misplaced, it will have no effect. This rule flags misplaced lint directives to ensure they \ + are in the correct location." } fn tags(&self) -> TagSet { diff --git a/wdl-lint/src/rules/unknown_rule.rs b/wdl-lint/src/rules/unknown_rule.rs index 10b23189..52eeee2c 100644 --- a/wdl-lint/src/rules/unknown_rule.rs +++ b/wdl-lint/src/rules/unknown_rule.rs @@ -42,7 +42,8 @@ impl Rule for UnknownRule { } fn explanation(&self) -> &'static str { - "TODO" + "When writing WDL, lint directives are used to suppress certain rules. If a rule is unknown, \ + nothing will be suppressed. This rule flags unknown rules as they are often mistakes." } fn tags(&self) -> TagSet { From 27956f6ff35714083a2b3e89ca1e552c3d1e6442 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Wed, 11 Sep 2024 16:24:09 -0400 Subject: [PATCH 12/30] chore: update changelogs and fmt --- wdl-ast/CHANGELOG.md | 6 ++++++ wdl-grammar/CHANGELOG.md | 4 ++++ wdl-lint/CHANGELOG.md | 4 ++++ wdl-lint/RULES.md | 4 +++- wdl-lint/src/rules/misplaced_lint_directive.rs | 6 +++--- wdl-lint/src/rules/unknown_rule.rs | 5 +++-- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/wdl-ast/CHANGELOG.md b/wdl-ast/CHANGELOG.md index 923ec432..24168c2e 100644 --- a/wdl-ast/CHANGELOG.md +++ b/wdl-ast/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +* moved "except comment" logic from `wdl-lint` into `wdl-ast`. + This is for future support of disabling certain diagnostics such as "unused import" and the like. + ([#162](https://github.com/stjude-rust-labs/wdl/pull/162)) + ### Changed * Removed `span_of` function in favor of `AstNode` extension trait ([#163](https://github.com/stjude-rust-labs/wdl/pull/163)). diff --git a/wdl-grammar/CHANGELOG.md b/wdl-grammar/CHANGELOG.md index 662d96c7..7e3503a2 100644 --- a/wdl-grammar/CHANGELOG.md +++ b/wdl-grammar/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +* `describe()` method to `SyntaxKind` ([#162](https://github.com/stjude-rust-labs/wdl/pull/162)) + ### Fixed * Fixed requiring comma delimiter for `input`, `object` and `hints` literal diff --git a/wdl-lint/CHANGELOG.md b/wdl-lint/CHANGELOG.md index f0543a8a..d123ace8 100644 --- a/wdl-lint/CHANGELOG.md +++ b/wdl-lint/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Fixed + +* Lint directives finally work :tada: ([#162](https://github.com/stjude-rust-labs/wdl/pull/162)) + ## 0.5.0 - 08-22-2024 ### Added diff --git a/wdl-lint/RULES.md b/wdl-lint/RULES.md index 96e25426..4a991cf5 100644 --- a/wdl-lint/RULES.md +++ b/wdl-lint/RULES.md @@ -7,7 +7,7 @@ be out of sync with released packages. ## Lint Rules | Name | Tags | Description | -| :------------------------------- | :---------------------------- | :------------------------------------------------------------------------------------------------ | +|:---------------------------------|:------------------------------|:--------------------------------------------------------------------------------------------------| | `BlankLinesBetweenElements` | Spacing | Ensures proper blank space between elements | | `CallInputSpacing` | Style, Clarity, Spacing | Ensures proper spacing for call inputs | | `CommandSectionMixedIndentation` | Clarity, Correctness, Spacing | Ensures that lines within a command do not mix spaces and tabs. | @@ -43,3 +43,5 @@ be out of sync with released packages. | `Todo` | Completeness | Ensures that `TODO` statements are flagged for followup. | | `TrailingComma` | Style | Ensures that lists and objects in meta have a trailing comma. | | `Whitespace` | Spacing, Style | Ensures that a document does not contain undesired whitespace. | +| `UnknownRule` | Clarity | Ensures there are no unknown rules present in lint directives. | +| `MisplacedLintDirective` | Clarity, Correctness | Ensures there are no misplaced lint directives. | diff --git a/wdl-lint/src/rules/misplaced_lint_directive.rs b/wdl-lint/src/rules/misplaced_lint_directive.rs index db7f0ecc..e690c8a4 100644 --- a/wdl-lint/src/rules/misplaced_lint_directive.rs +++ b/wdl-lint/src/rules/misplaced_lint_directive.rs @@ -64,9 +64,9 @@ impl Rule for MisplacedLintDirective { } fn explanation(&self) -> &'static str { - "When writing WDL, lint directives are used to suppress certain rules. If a lint directive is \ - misplaced, it will have no effect. This rule flags misplaced lint directives to ensure they \ - are in the correct location." + "When writing WDL, lint directives are used to suppress certain rules. If a lint directive \ + is misplaced, it will have no effect. This rule flags misplaced lint directives to ensure \ + they are in the correct location." } fn tags(&self) -> TagSet { diff --git a/wdl-lint/src/rules/unknown_rule.rs b/wdl-lint/src/rules/unknown_rule.rs index 52eeee2c..c26c09a5 100644 --- a/wdl-lint/src/rules/unknown_rule.rs +++ b/wdl-lint/src/rules/unknown_rule.rs @@ -42,8 +42,9 @@ impl Rule for UnknownRule { } fn explanation(&self) -> &'static str { - "When writing WDL, lint directives are used to suppress certain rules. If a rule is unknown, \ - nothing will be suppressed. This rule flags unknown rules as they are often mistakes." + "When writing WDL, lint directives are used to suppress certain rules. If a rule is \ + unknown, nothing will be suppressed. This rule flags unknown rules as they are often \ + mistakes." } fn tags(&self) -> TagSet { From ba0015310853bb6e8d7080ddab312c73a2e9b9a3 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Fri, 13 Sep 2024 16:01:18 -0400 Subject: [PATCH 13/30] [WIP] --- wdl-lint/src/lib.rs | 3 +- wdl-lint/src/rules.rs | 6 +- wdl-lint/src/rules/preamble_comments.rs | 170 ------- wdl-lint/src/rules/preamble_formatting.rs | 475 ++++++++++++++++++ wdl-lint/src/rules/preamble_whitespace.rs | 286 ----------- wdl-lint/src/visitor.rs | 5 +- .../between-import-whitespace/source.errors | 42 +- .../between-import-whitespace/source.wdl | 1 + .../source.errors | 146 +++--- .../blank-lines-between-elements/source.wdl | 1 + .../command-mixed-line-cont/source.errors | 16 +- .../lints/command-mixed-line-cont/source.wdl | 1 + .../command-mixed-spaces-first/source.errors | 16 +- .../command-mixed-spaces-first/source.wdl | 1 + .../command-mixed-tabs-first/source.errors | 16 +- .../lints/command-mixed-tabs-first/source.wdl | 1 + .../lints/command-mixed-trailing/source.wdl | 1 + .../lints/command-mixed-ws-ok/source.wdl | 1 + .../tests/lints/command-mixed/source.errors | 12 +- wdl-lint/tests/lints/command-mixed/source.wdl | 1 + .../lints/comment-whitespace/source.errors | 56 +-- .../tests/lints/comment-whitespace/source.wdl | 1 + .../tests/lints/container-value/source.errors | 32 +- .../tests/lints/container-value/source.wdl | 1 + .../tests/lints/curly-command/source.errors | 4 +- wdl-lint/tests/lints/curly-command/source.wdl | 1 + .../lints/deprecated-object/source.errors | 12 +- .../tests/lints/deprecated-object/source.wdl | 1 + .../source.wdl | 2 +- .../source.wdl | 2 +- .../lints/description-missing/source.errors | 12 +- .../lints/description-missing/source.wdl | 1 + .../tests/lints/double-quotes/source.errors | 20 +- wdl-lint/tests/lints/double-quotes/source.wdl | 1 + wdl-lint/tests/lints/except/source.errors | 12 +- wdl-lint/tests/lints/except/source.wdl | 1 + .../lints/import-placements/source.errors | 8 +- .../tests/lints/import-placements/source.wdl | 1 + .../lints/inconsistent-newlines/source.errors | 15 +- .../lints/inconsistent-newlines/source.wdl | 3 +- .../invalid-preamble-comment/source.errors | 12 +- .../lints/invalid-preamble-comment/source.wdl | 1 + .../lints/matching-param-meta/source.errors | 16 +- .../lints/matching-param-meta/source.wdl | 1 + .../source.errors | 8 - .../source.wdl | 1 + .../lints/missing-comment-space/source.errors | 6 +- .../lints/missing-comment-space/source.wdl | 1 + .../lints/missing-eof-newline/source.errors | 12 +- .../lints/missing-eof-newline/source.wdl | 1 + .../source.errors | 4 +- .../source.wdl | 1 + .../lints/missing-preamble-ws/source.errors | 10 - .../lints/missing-preamble-ws/source.wdl | 1 + .../lints/missing-runtime-block/source.errors | 4 +- .../lints/missing-runtime-block/source.wdl | 1 + .../lints/multiple-eof-newline/source.errors | 6 +- .../lints/multiple-eof-newline/source.wdl | 1 + .../tests/lints/one-eof-newline/source.wdl | 1 + .../source.errors | 24 +- .../one-invalid-preamble-comment/source.wdl | 1 + .../tests/lints/only-whitespace/source.errors | 32 +- .../tests/lints/only-whitespace/source.wdl | 1 + .../source.errors | 26 +- .../preamble-comment-after-version/source.wdl | 1 + .../tests/lints/preamble-ws/source.errors | 24 +- wdl-lint/tests/lints/snake-case/source.errors | 32 +- wdl-lint/tests/lints/snake-case/source.wdl | 1 + .../struct-matching-param-meta/source.errors | 16 +- .../struct-matching-param-meta/source.wdl | 1 + wdl-lint/tests/lints/todo/source.errors | 12 +- wdl-lint/tests/lints/todo/source.wdl | 1 + .../too-many-pounds-preamble/source.errors | 12 +- .../lints/too-many-pounds-preamble/source.wdl | 1 + .../tests/lints/two-eof-newline/source.errors | 6 +- .../tests/lints/two-eof-newline/source.wdl | 1 + .../unnecessary-preamble-ws/source.errors | 18 - .../lints/unnecessary-preamble-ws/source.wdl | 1 + .../within-import-whitespace/source.errors | 44 +- .../lints/within-import-whitespace/source.wdl | 1 + .../lints/ws-after-blank-line/source.errors | 9 - .../lints/ws-after-blank-line/source.wdl | 1 + .../lints/ws-before-version/source.errors | 18 - .../lints/ws-preamble-comments/source.errors | 18 +- .../lints/ws-preamble-comments/source.wdl | 1 + 85 files changed, 876 insertions(+), 902 deletions(-) delete mode 100644 wdl-lint/src/rules/preamble_comments.rs create mode 100644 wdl-lint/src/rules/preamble_formatting.rs delete mode 100644 wdl-lint/src/rules/preamble_whitespace.rs diff --git a/wdl-lint/src/lib.rs b/wdl-lint/src/lib.rs index 623b4f72..c9527d26 100644 --- a/wdl-lint/src/lib.rs +++ b/wdl-lint/src/lib.rs @@ -80,8 +80,7 @@ pub fn rules() -> Vec> { Box::::default(), Box::::default(), Box::::default(), - Box::::default(), - Box::::default(), + Box::::default(), Box::::default(), Box::::default(), Box::::default(), diff --git a/wdl-lint/src/rules.rs b/wdl-lint/src/rules.rs index 1ff57605..9388e74d 100644 --- a/wdl-lint/src/rules.rs +++ b/wdl-lint/src/rules.rs @@ -29,8 +29,7 @@ mod missing_runtime; mod no_curly_commands; mod nonmatching_output; mod pascal_case; -mod preamble_comments; -mod preamble_whitespace; +mod preamble_formatting; mod runtime_section_keys; mod section_order; mod snake_case; @@ -68,8 +67,7 @@ pub use missing_runtime::*; pub use no_curly_commands::*; pub use nonmatching_output::*; pub use pascal_case::*; -pub use preamble_comments::*; -pub use preamble_whitespace::*; +pub use preamble_formatting::*; pub use runtime_section_keys::*; pub use section_order::*; pub use snake_case::*; diff --git a/wdl-lint/src/rules/preamble_comments.rs b/wdl-lint/src/rules/preamble_comments.rs deleted file mode 100644 index 239f1349..00000000 --- a/wdl-lint/src/rules/preamble_comments.rs +++ /dev/null @@ -1,170 +0,0 @@ -//! A lint rule that checks for an incorrect preamble comments. - -use wdl_ast::AstToken; -use wdl_ast::Comment; -use wdl_ast::Diagnostic; -use wdl_ast::Diagnostics; -use wdl_ast::Document; -use wdl_ast::Span; -use wdl_ast::SupportedVersion; -use wdl_ast::SyntaxKind; -use wdl_ast::VersionStatement; -use wdl_ast::VisitReason; -use wdl_ast::Visitor; -use wdl_ast::EXCEPT_COMMENT_PREFIX; - -use crate::Rule; -use crate::Tag; -use crate::TagSet; - -/// The identifier for the preamble comments rule. -const ID: &str = "PreambleComments"; - -/// Creates an "invalid preamble comment" diagnostic. -fn invalid_preamble_comment(span: Span) -> Diagnostic { - Diagnostic::note("preamble comments must start with `##` followed by a space") - .with_rule(ID) - .with_highlight(span) - .with_fix("change each preamble comment to start with `##` followed by a space") -} - -/// Creates a "preamble comment after version" diagnostic. -fn preamble_comment_after_version(span: Span) -> Diagnostic { - Diagnostic::note("preamble comments cannot come after the version statement") - .with_rule(ID) - .with_highlight(span) - .with_fix("change each comment to start with `#` followed by a space") -} - -/// Detects incorrect comments in a document preamble. -#[derive(Default, Debug, Clone, Copy)] -pub struct PreambleCommentsRule { - /// Whether or not the preamble has finished. - finished: bool, - /// The number of comment tokens to skip. - skip_count: usize, -} - -impl Rule for PreambleCommentsRule { - fn id(&self) -> &'static str { - ID - } - - fn description(&self) -> &'static str { - "Ensures that documents have correct comments in the preamble." - } - - fn explanation(&self) -> &'static str { - "Preamble comments are full line comments before the version declaration and they start \ - with a double pound sign. These comments are reserved for documentation that doesn't fit \ - within any of the WDL-defined documentation elements (such as `meta` and `parameter_meta` \ - sections). They may provide context for a collection of tasks or structs, or they may \ - provide a high-level overview of the workflow. Double-pound-sign comments are not allowed \ - after the version declaration. All comments before the version declaration should start \ - with a double pound sign (or if they are not suitable as preamble comments they should be \ - moved to _after_ the version declaration). Comments beginning with 3 or more pound signs \ - are permitted after the version declaration, as they are not considered preamble \ - comments. Comments beginning with 3 or more pound signs before the version declaration \ - are not permitted." - } - - fn tags(&self) -> TagSet { - TagSet::new(&[Tag::Spacing, Tag::Style, Tag::Clarity]) - } - - fn exceptable_nodes(&self) -> Option> { - Some(vec![SyntaxKind::VersionStatementNode]) - } -} - -impl Visitor for PreambleCommentsRule { - type State = Diagnostics; - - fn document( - &mut self, - _: &mut Self::State, - reason: VisitReason, - _: &Document, - _: SupportedVersion, - ) { - if reason == VisitReason::Exit { - return; - } - - // Reset the visitor upon document entry - *self = Default::default(); - } - - fn version_statement( - &mut self, - _: &mut Self::State, - reason: VisitReason, - _: &VersionStatement, - ) { - if reason == VisitReason::Exit { - return; - } - - // We're finished after the version statement - self.finished = true; - } - - fn comment(&mut self, state: &mut Self::State, comment: &Comment) { - // Skip this comment if necessary; this occurs if we've consolidated multiple - // comments in a row into a single diagnostic - if self.skip_count > 0 { - self.skip_count -= 1; - return; - } - - let check = |text: &str| { - let double_pound = text == "##" || text.starts_with("## "); - let except = text.starts_with(EXCEPT_COMMENT_PREFIX); - (self.finished && !double_pound) || (!self.finished && (double_pound | except)) - }; - - if check(comment.as_str()) { - // The comment is valid, stop here - return; - } - - // Otherwise, look for the next siblings that might also be invalid; - // if so, consolidate them into a single diagnostic - let mut span = comment.span(); - let mut current = comment.syntax().next_sibling_or_token(); - while let Some(sibling) = current { - match sibling.kind() { - SyntaxKind::Comment => { - // As we're processing this sibling comment here, increment the skip count - self.skip_count += 1; - - if check(sibling.as_token().expect("should be a token").text()) { - // The comment is valid, stop here - break; - } - - // Not valid, update the span - span = Span::new( - span.start(), - usize::from(sibling.text_range().end()) - span.start(), - ); - } - SyntaxKind::Whitespace => { - // Skip whitespace - } - _ => break, - } - - current = sibling.next_sibling_or_token(); - } - - // Since this rule can only be excepted in a document-wide fashion, - // if the rule is running we can directly add the diagnostic - // without checking for the exceptable nodes - if self.finished { - state.add(preamble_comment_after_version(span)); - } else { - state.add(invalid_preamble_comment(span)); - } - } -} diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs new file mode 100644 index 00000000..e3591eaa --- /dev/null +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -0,0 +1,475 @@ +//! A lint rule that checks the formatting of the preamble. + +use wdl_ast::AstToken; +use wdl_ast::Comment; +use wdl_ast::Diagnostic; +use wdl_ast::Diagnostics; +use wdl_ast::Document; +use wdl_ast::Span; +use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; +use wdl_ast::ToSpan; +use wdl_ast::VersionStatement; +use wdl_ast::VisitReason; +use wdl_ast::Visitor; +use wdl_ast::Whitespace; +use wdl_ast::EXCEPT_COMMENT_PREFIX; + +use crate::Rule; +use crate::Tag; +use crate::TagSet; + +/// The identifier for the preamble formatting rule. +const ID: &str = "PreambleFormatting"; + +/// Creates an "invalid preamble comment" diagnostic. +fn invalid_preamble_comment(span: Span) -> Diagnostic { + Diagnostic::note("preamble comments must start with `##` followed by a space") + .with_rule(ID) + .with_highlight(span) + .with_fix("change each preamble comment to start with `##` followed by a space") +} + +/// Creates a "preamble comment before directive" diagnostic. +fn preamble_comment_before_directive(span: Span) -> Diagnostic { + Diagnostic::note("preamble comments must come after lint directives") + .with_rule(ID) + .with_highlight(span) + .with_fix("move the preamble comment after the lint directive") +} + +/// Creates a "directive after preamble comment" diagnostic. +fn directive_after_preamble_comment(span: Span) -> Diagnostic { + Diagnostic::note("lint directives must come before preamble comments") + .with_rule(ID) + .with_highlight(span) + .with_fix("move the lint directive before the preamble comment") +} + +/// Creates an "unnecessary whitespace" diagnostic. +fn unnecessary_whitespace(span: Span) -> Diagnostic { + Diagnostic::note("unnecessary whitespace in document preamble") + .with_rule(ID) + .with_highlight(span) + .with_fix("remove the unnecessary whitespace") +} + +/// Creates an "expected a blank line before" diagnostic. +fn expected_blank_line_before_version(span: Span) -> Diagnostic { + Diagnostic::note("expected exactly one blank line before the version statement") + .with_rule(ID) + .with_highlight(span) + .with_fix("add a blank line between the last preamble comment and the version statement") +} + +/// Creates an "expected a blank line before preamble comment" diagnostic. +fn expected_blank_line_before_preamble_comment(span: Span) -> Diagnostic { + Diagnostic::note( + "expected exactly one blank line between lint directives and preamble comments", + ) + .with_rule(ID) + .with_highlight(span) + .with_fix("add a blank line between the last lint directive and the first preamble comment") +} + +/// Detects if a comment is a lint directive. +fn is_lint_directive(text: &str) -> bool { + text.starts_with(EXCEPT_COMMENT_PREFIX) +} + +/// Detects if a comment is a preamble comment. +fn is_preamble_comment(text: &str) -> bool { + text == "##" || text.starts_with("## ") +} + +/// The state of preamble processing. +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] +enum PreambleState { + /// The preamble is not being processed. + #[default] + Start, + /// We are processing the lint directive block. + LintDirectiveBlock, + /// We are processing the preamble comment block. + PreambleCommentBlock, + /// The preamble is finished + Finished, +} + +/// A struct that tracks the last processed preamble comment, whitespace, and +/// lint directive. +#[derive(Default, Debug, Clone)] +struct LastProcessed { + /// The last lint directive. + lint_directive: Option, + /// The last preamble comment. + preamble_comment: Option, +} + +/// An enum that represents the type of diagnostic to extend. +enum ExtendDiagnostic { + /// Extend a lint directive diagnostic. + LintDirective, + /// Extend a preamble comment diagnostic. + PreambleComment, + /// Extend an invalid comment diagnostic. + InvalidComment, +} + +/// Detects incorrect comments in a document preamble. +#[derive(Default, Debug, Clone)] +pub struct PreambleFormattingRule { + /// The current state of preamble processing. + state: PreambleState, + /// The last processed preamble comment, whitespace, and lint directive. + last_processed: LastProcessed, + /// The number of comment tokens to skip. + /// + /// This is used to skip comments that were consolidated in a prior + /// diagnostic. + skip_count: usize, +} + +impl Rule for PreambleFormattingRule { + fn id(&self) -> &'static str { + ID + } + + fn description(&self) -> &'static str { + "Ensures that documents have correct formatting in the preamble." + } + + fn explanation(&self) -> &'static str { + "The document preamble is defined as anything before the version declaration statement and \ + the version declaration statement itself. Only comments and whitespace are permitted \ + before the version declaration. + + All comments in the preamble should conform to one of two special formats: + + 1. \"lint directives\" are special comments that begin with `#@ except:` followed by a \ + comma-delimited list of rule IDs. These comments are used to disable specific lint rules \ + for a specific section of the document. When a lint directive is encountered in the \ + preamble, it will disable the specified rules for the entire document. + 2. double-pound-sign comments (beginning with `##`) are special comments that are used \ + for documentation that doesn't fit within any of the WDL-defined documentation elements \ + (i.e. `meta` and `parameter_meta` sections). These comments may provide context for a \ + collection of tasks or structs, or they may provide a high-level overview of the \ + workflow. We refer to these special double-pound-sign comments as \"preamble comments\". \ + Lint directives are not considered preamble comments. + + Both of these comments are expected to be full line comments (i.e. they should not have \ + any whitespace before the comment). If lint directives are present, they should be the \ + absolute beginning of the document. Multiple lint directives are permitted, but they \ + should not be interleaved with preamble comments or blank lines. + + A space should follow the double-pound-sign if there is any text within the preamble \ + comment. \"Empty\" preamble comments are permitted and should not have any whitespace \ + following the `##`. Comments beginning with 3 or more pound signs before the version \ + declaration are not permitted. All preamble comments should be in a single block without \ + blank lines. Following this block, there should always be a blank line before the version \ + statement. + + Both lint directives and preamble comments are optional, and if they are not present, \ + there should be no comments or whitespace before the version declaration." + } + + fn tags(&self) -> TagSet { + TagSet::new(&[Tag::Spacing, Tag::Style, Tag::Clarity]) + } + + fn exceptable_nodes(&self) -> Option> { + Some(vec![SyntaxKind::VersionStatementNode]) + } +} + +impl Visitor for PreambleFormattingRule { + type State = Diagnostics; + + fn document( + &mut self, + _: &mut Self::State, + reason: VisitReason, + _: &Document, + _: SupportedVersion, + ) { + if reason == VisitReason::Exit { + return; + } + + // Reset the visitor upon document entry + *self = Default::default(); + } + + fn whitespace(&mut self, state: &mut Self::State, whitespace: &Whitespace) { + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes + + if self.state == PreambleState::Finished { + return; + } + + // If the next sibling is the version statement, let the VersionFormatting rule + // handle this particular whitespace + if whitespace + .syntax() + .next_sibling_or_token() + .map(|s| s.kind() == SyntaxKind::VersionStatementNode) + .unwrap_or(false) + { + return; + } + + let s = whitespace.as_str(); + // If there is a previous token, it must be a comment + if let Some(prev_comment) = whitespace.syntax().prev_token() { + let prev_text = prev_comment.text(); + let prev_is_lint_directive = is_lint_directive(prev_text); + let prev_is_preamble_comment = is_preamble_comment(prev_text); + + let next_token = whitespace + .syntax() + .next_token() + .expect("should have a next token"); + if next_token.kind() != SyntaxKind::Comment { + // The next token must be part of the version statement + // and since we've already established there's a prior comment, + // this whitespace must be _exactly_ two newlines. + if s != "\r\n\r\n" && s != "\n\n" { + state.add(expected_blank_line_before_version(whitespace.span())); + } + return; + } + + let next_text = next_token.text(); + let next_is_lint_directive = is_lint_directive(next_text); + let next_is_preamble_comment = is_preamble_comment(next_text); + + let expect_single_blank = match ( + prev_is_lint_directive, + prev_is_preamble_comment, + next_is_lint_directive, + next_is_preamble_comment, + ) { + (true, false, true, false) => { + // Lint directive followed by lint directive + false + } + (true, false, false, true) => { + // Lint directive followed by preamble comment + true + } + (false, true, false, true) => { + // Preamble comment followed by preamble comment + false + } + (false, true, true, false) => { + // Preamble comment followed by lint directive + return; + } + (_, _, false, false) => { + // anything followed by invalid comment + return; + } + (false, false, ..) => { + // Invalid comment followed by anything + return; + } + _ => { + unreachable!() + } + }; + + // Don't include the newline separating the previous comment from the + // whitespace + let offset = if s.starts_with("\r\n") { + 2 + } else if s.starts_with('\n') { + 1 + } else { + 0 + }; + + let span = whitespace.span(); + if expect_single_blank { + if s != "\r\n\r\n" && s != "\n\n" { + state.add(expected_blank_line_before_preamble_comment(span)); + } + } else if s != "\r\n" && s != "\n" { + state.add(unnecessary_whitespace(Span::new( + span.start() + offset, + span.len() - offset, + ))); + } else { + return; + } + } else { + // Whitespace is not allowed to start the document. + state.add(unnecessary_whitespace(whitespace.span())); + } + } + + fn comment(&mut self, state: &mut Self::State, comment: &Comment) { + if self.state == PreambleState::Finished { + return; + } + + // Skip this comment if necessary; this occurs if we've consolidated multiple + // comments in a row into a single diagnostic + if self.skip_count > 0 { + self.skip_count -= 1; + return; + } + + let text = comment.as_str(); + let lint_directive = is_lint_directive(text); + let preamble_comment = is_preamble_comment(text); + + let mut extend = None; + + if !lint_directive && !preamble_comment { + extend = Some(ExtendDiagnostic::InvalidComment); + } else if self.state == PreambleState::Start { + if lint_directive { + self.state = PreambleState::LintDirectiveBlock; + self.last_processed.lint_directive = Some(comment.span()); + } + if preamble_comment { + self.state = PreambleState::PreambleCommentBlock; + self.last_processed.preamble_comment = Some(comment.span()); + } + return; + } else if self.state == PreambleState::LintDirectiveBlock { + if lint_directive { + self.last_processed.lint_directive = Some(comment.span()); + return; + } + if preamble_comment { + if self.last_processed.preamble_comment.is_some() { + // Preamble block has already been processed. This is an error. + extend = Some(ExtendDiagnostic::PreambleComment); + } else { + // We are switching from the lint directive block to the preamble comment block + // Whitespace will be handled by the whitespace visitor. + self.state = PreambleState::PreambleCommentBlock; + self.last_processed.preamble_comment = Some(comment.span()); + return; + } + } + } else if self.state == PreambleState::PreambleCommentBlock { + if preamble_comment { + self.last_processed.preamble_comment = Some(comment.span()); + return; + } + if lint_directive { + extend = Some(ExtendDiagnostic::LintDirective); + } + } + + // Otherwise, look for the next siblings that might also be invalid; + // if so, consolidate them into a single diagnostic + let mut span = comment.span(); + let mut current = comment.syntax().next_sibling_or_token(); + while let Some(sibling) = current { + match sibling.kind() { + SyntaxKind::Comment => { + let sibling_text = sibling.as_token().expect("should be a token").text(); + let sibling_is_lint_directive = is_lint_directive(sibling_text); + let sibling_is_preamble_comment = is_preamble_comment(sibling_text); + + match extend { + Some(ExtendDiagnostic::LintDirective) => { + if sibling_is_lint_directive { + // As we're processing this sibling comment here, increment the skip + // count + self.skip_count += 1; + + span = Span::new( + span.start(), + usize::from(sibling.text_range().end()) - span.start(), + ); + self.last_processed.lint_directive = + Some(sibling.text_range().to_span()); + } else { + // Sibling should not be part of this diagnostic + break; + } + } + Some(ExtendDiagnostic::PreambleComment) => { + if sibling_is_preamble_comment { + // As we're processing this sibling comment here, increment the skip + // count + self.skip_count += 1; + + span = Span::new( + span.start(), + usize::from(sibling.text_range().end()) - span.start(), + ); + self.last_processed.preamble_comment = + Some(sibling.text_range().to_span()); + } else { + // Sibling should not be part of this diagnostic + break; + } + } + Some(ExtendDiagnostic::InvalidComment) => { + if !sibling_is_lint_directive && !sibling_is_preamble_comment { + // As we're processing this sibling comment here, increment the skip + // count + self.skip_count += 1; + + span = Span::new( + span.start(), + usize::from(sibling.text_range().end()) - span.start(), + ); + // TODO: need to track this span? + } else { + // Sibling should not be part of this diagnostic + break; + } + } + None => { + unreachable!(); + } + } + } + SyntaxKind::Whitespace => { + // Skip whitespace + } + _ => break, + } + + current = sibling.next_sibling_or_token(); + } + + // Since this rule can only be excepted in a document-wide fashion, + // if the rule is running we can directly add the diagnostic + // without checking for the exceptable nodes + match extend { + Some(ExtendDiagnostic::LintDirective) => { + state.add(directive_after_preamble_comment(span)); + } + Some(ExtendDiagnostic::PreambleComment) => { + state.add(preamble_comment_before_directive(span)); + } + Some(ExtendDiagnostic::InvalidComment) => { + state.add(invalid_preamble_comment(span)); + } + None => { + unreachable!() + } + } + } + + fn version_statement( + &mut self, + _state: &mut Self::State, + reason: VisitReason, + _stmt: &VersionStatement, + ) { + if reason == VisitReason::Exit { + return; + } + self.state = PreambleState::Finished; + } +} diff --git a/wdl-lint/src/rules/preamble_whitespace.rs b/wdl-lint/src/rules/preamble_whitespace.rs deleted file mode 100644 index d654e1ed..00000000 --- a/wdl-lint/src/rules/preamble_whitespace.rs +++ /dev/null @@ -1,286 +0,0 @@ -//! A lint rule that checks for an incorrect preamble whitespace. - -use wdl_ast::AstNode; -use wdl_ast::AstToken; -use wdl_ast::Diagnostic; -use wdl_ast::Diagnostics; -use wdl_ast::Document; -use wdl_ast::Span; -use wdl_ast::SupportedVersion; -use wdl_ast::SyntaxElement; -use wdl_ast::SyntaxKind; -use wdl_ast::ToSpan; -use wdl_ast::VersionStatement; -use wdl_ast::VisitReason; -use wdl_ast::Visitor; -use wdl_ast::Whitespace; - -use crate::util::lines_with_offset; -use crate::Rule; -use crate::Tag; -use crate::TagSet; - -/// The identifier for the preamble whitespace rule. -const ID: &str = "PreambleWhitespace"; - -/// Creates an "unnecessary whitespace" diagnostic. -fn unnecessary_whitespace(span: Span) -> Diagnostic { - Diagnostic::note("unnecessary whitespace in document preamble") - .with_rule(ID) - .with_highlight(span) - .with_fix("remove the unnecessary whitespace") -} - -/// Creates an "expected a blank line before" diagnostic. -fn expected_blank_line_before(span: Span) -> Diagnostic { - Diagnostic::note("expected a blank line before the version statement") - .with_rule(ID) - .with_highlight(span) - .with_fix("add a blank line between the last preamble comment and the version statement") -} - -/// Creates an "expected a blank line after" diagnostic. -fn expected_blank_line_after(span: Span) -> Diagnostic { - Diagnostic::note("expected a blank line after the version statement") - .with_rule(ID) - .with_label("add a blank line before this", span) - .with_fix("add a blank line immediately after the version statement") -} - -/// Detects incorrect whitespace in a document preamble. -#[derive(Default, Debug, Clone, Copy)] -pub struct PreambleWhitespaceRule { - /// Whether or not we've entered the version statement. - entered_version: bool, - /// Whether or not we've exited the version statement. - exited_version: bool, - /// Whether or not we've visited whitespace *after* the version statement. - checked_blank_after: bool, -} - -impl Rule for PreambleWhitespaceRule { - fn id(&self) -> &'static str { - ID - } - - fn description(&self) -> &'static str { - "Ensures that documents have correct whitespace in the preamble." - } - - fn explanation(&self) -> &'static str { - "The document preamble is defined as anything before the version declaration statement and \ - the version declaration statement itself. Only comments and whitespace are permitted \ - before the version declaration. If there are no comments, the version declaration must be \ - the first line of the document. If there are comments, there must be exactly one blank \ - line between the last comment and the version declaration. No extraneous whitespace is \ - allowed. A blank line must come after the preamble." - } - - fn tags(&self) -> TagSet { - TagSet::new(&[Tag::Spacing, Tag::Style]) - } - - fn exceptable_nodes(&self) -> Option> { - Some(vec![SyntaxKind::VersionStatementNode]) - } -} - -impl Visitor for PreambleWhitespaceRule { - type State = Diagnostics; - - fn document( - &mut self, - _: &mut Self::State, - reason: VisitReason, - _: &Document, - _: SupportedVersion, - ) { - if reason == VisitReason::Exit { - return; - } - - // Reset the visitor upon document entry - *self = Default::default(); - } - - fn version_statement( - &mut self, - state: &mut Self::State, - reason: VisitReason, - stmt: &VersionStatement, - ) { - if reason == VisitReason::Exit { - self.exited_version = true; - return; - } - - // Since this rule can only be excepted in a document-wide fashion, - // if the rule is running we can directly add the diagnostic - // without checking for the exceptable nodes - - // We're finished after the version statement - self.entered_version = true; - - // If the previous token is whitespace and its previous token is a comment, - // then the whitespace should just be two lines - match stmt - .syntax() - .prev_sibling_or_token() - .and_then(SyntaxElement::into_token) - { - Some(whitespace) if whitespace.kind() == SyntaxKind::Whitespace => { - let range = whitespace.text_range(); - if whitespace - .prev_sibling_or_token() - .map(|s| s.kind() == SyntaxKind::Comment) - .unwrap_or(false) - { - // There's a preceding comment, so it is expected that the whitespace is only - // two newlines in a row - let text = whitespace.text(); - let mut count = 0; - for (line, start, next_start) in lines_with_offset(text) { - // If this is not a blank line, it's unnecessary whitespace - if !line.is_empty() { - state.add(unnecessary_whitespace(Span::new( - usize::from(range.start()) + start, - line.len(), - ))); - } - - count += 1; - if count == 2 { - // If the previous byte isn't a newline, then we are missing a blank - // line - if text.as_bytes()[next_start - 1] != b'\n' { - state.add(expected_blank_line_before(Span::new( - usize::from(range.start()) + start, - 1, - ))); - } - - // We're at the second line, the remainder is unnecessary whitespace - if next_start < text.len() { - state.add(unnecessary_whitespace(Span::new( - usize::from(range.start()) + next_start, - text.len() - next_start, - ))); - } - - break; - } - } - - // We expected two lines - if count < 2 { - state.add(expected_blank_line_before(range.to_span())); - } - } else { - // Whitespace without a comment before it - state.add(unnecessary_whitespace(range.to_span())); - } - } - _ => { - // Previous token is not whitespace - } - } - } - - fn whitespace(&mut self, state: &mut Self::State, whitespace: &Whitespace) { - // Since this rule can only be excepted in a document-wide fashion, - // if the rule is running we can directly add the diagnostic - // without checking for the exceptable nodes - if self.exited_version { - // Check to see if we've already checked for a blank line after the version - // statement - if self.checked_blank_after { - return; - } - - self.checked_blank_after = true; - - let mut count = 0; - let text = whitespace.as_str(); - let span = whitespace.span(); - for (_, _, next_start) in lines_with_offset(text) { - count += 1; - if count == 2 { - // If the previous byte isn't a newline, then we are missing a blank - // line after the version statement - if text.as_bytes()[next_start - 1] != b'\n' { - state.add(expected_blank_line_after(Span::new( - span.start() + next_start, - 1, - ))); - } - - break; - } - } - - // We expected two lines or one if the whitespace is the last in the file - if count == 0 - || (count == 1 - && (whitespace.syntax().parent().unwrap().kind() != SyntaxKind::RootNode - || whitespace.syntax().next_sibling_or_token().is_some())) - { - state.add(expected_blank_line_after(Span::new( - span.start() + span.len(), - 1, - ))); - } - - return; - } - - // Ignore whitespace inside the version statement itself - if self.entered_version { - return; - } - - // If the next sibling is the version statement, let the `version_statement` - // callback handle this particular whitespace - if whitespace - .syntax() - .next_sibling_or_token() - .map(|s| s.kind() == SyntaxKind::VersionStatementNode) - .unwrap_or(false) - { - return; - } - - // Otherwise, the whitespace should have a comment token before it - if whitespace - .syntax() - .prev_sibling_or_token() - .map(|s| s.kind() == SyntaxKind::Comment) - .unwrap_or(false) - { - // Previous sibling is a comment, check that this is a single newline - let s = whitespace.as_str(); - if s == "\r\n" || s == "\n" { - // Whitespace token is valid - return; - } - - // Don't include the newline separating the previous comment from the whitespace - let offset = if s.starts_with("\r\n") { - 2 - } else if s.starts_with('\n') { - 1 - } else { - 0 - }; - - let span = whitespace.span(); - state.add(unnecessary_whitespace(Span::new( - span.start() + offset, - span.len() - offset, - ))); - return; - } - - // At this point, the whitespace is entirely unnecessary - state.add(unnecessary_whitespace(whitespace.span())); - } -} diff --git a/wdl-lint/src/visitor.rs b/wdl-lint/src/visitor.rs index 7ba3fc3e..82dd1bd8 100644 --- a/wdl-lint/src/visitor.rs +++ b/wdl-lint/src/visitor.rs @@ -378,8 +378,9 @@ mod test { #[test] fn it_supports_reuse() { - let source = r#"## Test source -#@ except: MissingMetas, MissingOutput + let source = r#"#@ except: MissingMetas, MissingOutput + +## Test source version 1.1 diff --git a/wdl-lint/tests/lints/between-import-whitespace/source.errors b/wdl-lint/tests/lints/between-import-whitespace/source.errors index 972a15fb..2c7d76df 100644 --- a/wdl-lint/tests/lints/between-import-whitespace/source.errors +++ b/wdl-lint/tests/lints/between-import-whitespace/source.errors @@ -1,52 +1,52 @@ note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/between-import-whitespace/source.wdl:7:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:8:1 │ -7 │ ╭ -8 │ │ import "baz.wdl" # BAD +8 │ ╭ +9 │ │ import "baz.wdl" # BAD │ ╰^ │ = fix: remove any blank lines between imports note[ImportWhitespace]: improper whitespace before import statement - ┌─ tests/lints/between-import-whitespace/source.wdl:9:1 - │ -9 │ import "foo.wdl" # BAD - │ ^^^^ extraneous whitespace should not be there - │ - = fix: use minimal whitespace before import statements + ┌─ tests/lints/between-import-whitespace/source.wdl:10:1 + │ +10 │ import "foo.wdl" # BAD + │ ^^^^ extraneous whitespace should not be there + │ + = fix: use minimal whitespace before import statements note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/between-import-whitespace/source.wdl:10:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:11:1 │ -10 │ ╭ -11 │ │ import "huh.wdl" # BAD +11 │ ╭ +12 │ │ import "huh.wdl" # BAD │ ╰^ │ = fix: remove any blank lines between imports note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/between-import-whitespace/source.wdl:14:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:15:1 │ -14 │ ╭ -15 │ │ # a comment and a blank is still BAD +15 │ ╭ +16 │ │ # a comment and a blank is still BAD │ ╰^ │ = fix: remove any blank lines between imports note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/between-import-whitespace/source.wdl:16:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:17:1 │ -16 │ ╭ -17 │ │ import "wah.wdl" # BAD +17 │ ╭ +18 │ │ import "wah.wdl" # BAD │ ╰^ │ = fix: remove any blank lines between imports warning[Whitespace]: more than one blank line in a row - ┌─ tests/lints/between-import-whitespace/source.wdl:19:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:20:1 │ -19 │ ╭ -20 │ │ import "zam.wdl" # 2 blanks will be caught be a _different_ check +20 │ ╭ +21 │ │ import "zam.wdl" # 2 blanks will be caught be a _different_ check │ ╰^ │ = fix: remove the unnecessary blank lines diff --git a/wdl-lint/tests/lints/between-import-whitespace/source.wdl b/wdl-lint/tests/lints/between-import-whitespace/source.wdl index 6c60b227..145876d2 100644 --- a/wdl-lint/tests/lints/between-import-whitespace/source.wdl +++ b/wdl-lint/tests/lints/between-import-whitespace/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing + ## This is a test of whitespace between import statements. version 1.1 diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors index 0e47b58d..289d399c 100755 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors @@ -1,192 +1,192 @@ note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/blank-lines-between-elements/source.wdl:8:1 - │ -8 │ ╭ -9 │ │ import "qux" # following whitespace duplication is caught be Whitespace rule - │ ╰^ - │ - = fix: remove any blank lines between imports + ┌─ tests/lints/blank-lines-between-elements/source.wdl:9:1 + │ + 9 │ ╭ +10 │ │ import "qux" # following whitespace duplication is caught be Whitespace rule + │ ╰^ + │ + = fix: remove any blank lines between imports warning[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:11:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:12:1 │ -11 │ ╭ -12 │ │ # test comment +12 │ ╭ +13 │ │ # test comment │ ╰^ │ = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:13:15 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:14:15 │ -13 │ workflow foo { +14 │ workflow foo { │ ╭──────────────^ -14 │ │ -15 │ │ # This is OK (but the prior line is not). +15 │ │ +16 │ │ # This is OK (but the prior line is not). │ ╰────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:18:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:19:5 │ -18 │ parameter_meta {} +19 │ parameter_meta {} │ ^^^^^^^^^^^^^^^^^ │ = fix: add a blank line before this element note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:19:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:20:5 │ -19 │ # what about this comment? +20 │ # what about this comment? │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: add a blank line before this element note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:21:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:22:5 │ -21 │ ╭ scatter (i in ["hello", "world"]) { -22 │ │ call bar { input: s = i } -23 │ │ } +22 │ ╭ scatter (i in ["hello", "world"]) { +23 │ │ call bar { input: s = i } +24 │ │ } │ ╰─────^ │ = fix: add a blank line before this element warning[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:29:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:30:1 │ -29 │ ╭ -30 │ │ String q = "bar" # The following whitespace is allowable between private declarations +30 │ ╭ +31 │ │ String q = "bar" # The following whitespace is allowable between private declarations │ ╰────^ │ = fix: remove the unnecessary blank lines warning[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:35:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:36:1 │ -35 │ ╭ -36 │ │ call bar { input: +36 │ ╭ +37 │ │ call bar { input: │ ╰────^ │ = fix: remove the unnecessary blank lines warning[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:40:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:41:1 │ -40 │ ╭ -41 │ │ call bar as baz { input: +41 │ ╭ +42 │ │ call bar as baz { input: │ ╰────^ │ = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:49:1 │ -48 │ ╭ task bar { -49 │ │ -50 │ │ meta { -51 │ │ +49 │ ╭ task bar { +50 │ │ +51 │ │ meta { +52 │ │ · │ -71 │ │ -72 │ │ } +72 │ │ +73 │ │ } │ ╰─^ │ = fix: add a blank line before this element note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:11 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:49:11 │ -48 │ task bar { +49 │ task bar { │ ╭──────────^ -49 │ │ -50 │ │ meta { +50 │ │ +51 │ │ meta { │ ╰────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:50:11 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:51:11 │ -50 │ meta { +51 │ meta { │ ╭──────────^ -51 │ │ -52 │ │ description: "bar" +52 │ │ +53 │ │ description: "bar" │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:52:27 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:53:27 │ -52 │ description: "bar" +53 │ description: "bar" │ ╭──────────────────────────^ -53 │ │ -54 │ │ outputs: { +54 │ │ +55 │ │ outputs: { │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:55:19 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:56:19 │ -55 │ u: "u" +56 │ u: "u" │ ╭──────────────────^ -56 │ │ -57 │ │ } +57 │ │ +58 │ │ } │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:61:27 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:62:27 │ -61 │ String s = "hello" +62 │ String s = "hello" │ ╭──────────────────────────^ -62 │ │ -63 │ │ String? t +63 │ │ +64 │ │ String? t │ ╰────────^ │ = fix: remove the blank line(s) warning[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:79:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:80:1 │ -79 │ ╭ -80 │ │ input {} +80 │ ╭ +81 │ │ input {} │ ╰────^ │ = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:86:14 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:87:14 │ -86 │ runtime { +87 │ runtime { │ ╭─────────────^ -87 │ │ -88 │ │ disks: "50 GB" +88 │ │ +89 │ │ disks: "50 GB" │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:89:23 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:90:23 │ -89 │ memory: "4 GB" +90 │ memory: "4 GB" │ ╭──────────────────────^ -90 │ │ -91 │ │ container: "ubuntu:latest" +91 │ │ +92 │ │ container: "ubuntu:latest" │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:91:35 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:92:35 │ -91 │ container: "ubuntu:latest" +92 │ container: "ubuntu:latest" │ ╭──────────────────────────────────^ -92 │ │ -93 │ │ } +93 │ │ +94 │ │ } │ ╰────^ │ = fix: remove the blank line(s) diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl b/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl index 5fb129ee..08477008 100644 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl @@ -1,5 +1,6 @@ #@ except: ContainerValue, DescriptionMissing, DisallowedInputName, DisallowedOutputName #@ except: InputSorting, LineWidth, MissingMetas, MissingOutput, MissingRuntime + ## CommentWhitespace, ImportWhitespace, and Whitespace are left enabled to understand all whitespace diagnostics. version 1.1 diff --git a/wdl-lint/tests/lints/command-mixed-line-cont/source.errors b/wdl-lint/tests/lints/command-mixed-line-cont/source.errors index f4d32cc9..fe9c9d21 100644 --- a/wdl-lint/tests/lints/command-mixed-line-cont/source.errors +++ b/wdl-lint/tests/lints/command-mixed-line-cont/source.errors @@ -1,21 +1,21 @@ warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-line-cont/source.wdl:12:2 + ┌─ tests/lints/command-mixed-line-cont/source.wdl:13:2 │ -10 │ command <<< +11 │ command <<< │ ------- this command section uses both tabs and spaces in leading whitespace -11 │ this line has a continuation / -12 │ and should be a warning +12 │ this line has a continuation / +13 │ and should be a warning │ ^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-line-cont/source.wdl:25:2 + ┌─ tests/lints/command-mixed-line-cont/source.wdl:26:2 │ -23 │ command { +24 │ command { │ ------- this command section uses both tabs and spaces in leading whitespace -24 │ this line has a continuation / -25 │ and should be a warning +25 │ this line has a continuation / +26 │ and should be a warning │ ^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation diff --git a/wdl-lint/tests/lints/command-mixed-line-cont/source.wdl b/wdl-lint/tests/lints/command-mixed-line-cont/source.wdl index 4c50cc44..7a4ab4e2 100644 --- a/wdl-lint/tests/lints/command-mixed-line-cont/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-line-cont/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NoCurlyCommands, NonmatchingOutput, RuntimeSectionKeys + ## This is a test of having mixed indentation in a line continuation. version 1.1 diff --git a/wdl-lint/tests/lints/command-mixed-spaces-first/source.errors b/wdl-lint/tests/lints/command-mixed-spaces-first/source.errors index 6986cdd3..83d40e1e 100644 --- a/wdl-lint/tests/lints/command-mixed-spaces-first/source.errors +++ b/wdl-lint/tests/lints/command-mixed-spaces-first/source.errors @@ -1,21 +1,21 @@ warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-spaces-first/source.wdl:12:1 + ┌─ tests/lints/command-mixed-spaces-first/source.wdl:13:1 │ -10 │ command <<< +11 │ command <<< │ ------- this command section uses both tabs and spaces in leading whitespace -11 │ this line is prefixed with spaces -12 │ this line is prefixed with ~{"tabs"} +12 │ this line is prefixed with spaces +13 │ this line is prefixed with ~{"tabs"} │ ^^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-spaces-first/source.wdl:25:1 + ┌─ tests/lints/command-mixed-spaces-first/source.wdl:26:1 │ -23 │ command { +24 │ command { │ ------- this command section uses both tabs and spaces in leading whitespace -24 │ this line is prefixed with spaces -25 │ this line is prefixed with ~{"tabs"} +25 │ this line is prefixed with spaces +26 │ this line is prefixed with ~{"tabs"} │ ^^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation diff --git a/wdl-lint/tests/lints/command-mixed-spaces-first/source.wdl b/wdl-lint/tests/lints/command-mixed-spaces-first/source.wdl index b2eded8d..8032ce80 100644 --- a/wdl-lint/tests/lints/command-mixed-spaces-first/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-spaces-first/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NoCurlyCommands, RuntimeSectionKeys + ## This is a test of having spaces before tabs in command sections. version 1.1 diff --git a/wdl-lint/tests/lints/command-mixed-tabs-first/source.errors b/wdl-lint/tests/lints/command-mixed-tabs-first/source.errors index 3ddeb1f4..982a6d90 100644 --- a/wdl-lint/tests/lints/command-mixed-tabs-first/source.errors +++ b/wdl-lint/tests/lints/command-mixed-tabs-first/source.errors @@ -1,21 +1,21 @@ warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-tabs-first/source.wdl:12:1 + ┌─ tests/lints/command-mixed-tabs-first/source.wdl:13:1 │ -10 │ command <<< +11 │ command <<< │ ------- this command section uses both tabs and spaces in leading whitespace -11 │ this line is prefixed with ~{"tabs"} -12 │ this line is prefixed with spaces +12 │ this line is prefixed with ~{"tabs"} +13 │ this line is prefixed with spaces │ ^ indented with tabs until this space │ = fix: use the same whitespace character for indentation warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-tabs-first/source.wdl:25:1 + ┌─ tests/lints/command-mixed-tabs-first/source.wdl:26:1 │ -23 │ command { +24 │ command { │ ------- this command section uses both tabs and spaces in leading whitespace -24 │ this line is prefixed with ~{"tabs"} -25 │ this line is prefixed with spaces +25 │ this line is prefixed with ~{"tabs"} +26 │ this line is prefixed with spaces │ ^ indented with tabs until this space │ = fix: use the same whitespace character for indentation diff --git a/wdl-lint/tests/lints/command-mixed-tabs-first/source.wdl b/wdl-lint/tests/lints/command-mixed-tabs-first/source.wdl index 7b39de1a..cbcd9ed9 100644 --- a/wdl-lint/tests/lints/command-mixed-tabs-first/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-tabs-first/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NoCurlyCommands, RuntimeSectionKeys + ## This is a test of having tabs before spaces in command sections. version 1.1 diff --git a/wdl-lint/tests/lints/command-mixed-trailing/source.wdl b/wdl-lint/tests/lints/command-mixed-trailing/source.wdl index 14273bd9..8aa7d169 100644 --- a/wdl-lint/tests/lints/command-mixed-trailing/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-trailing/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NoCurlyCommands, RuntimeSectionKeys + ## This is a test of having mixed _trailing_ indentation in command sections. ## There should be no warnings from the `CommandSectionMixedIndentation` rule. diff --git a/wdl-lint/tests/lints/command-mixed-ws-ok/source.wdl b/wdl-lint/tests/lints/command-mixed-ws-ok/source.wdl index 203ec0b3..61d107d7 100644 --- a/wdl-lint/tests/lints/command-mixed-ws-ok/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-ws-ok/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, ExpressionSpacing, LineWidth, NoCurlyCommands, RuntimeSectionKeys + ## This is a test of having mixed indentation inside of a placeholder. ## This should not cause a warning for the `CommandSectionMixedIndentation` rule. diff --git a/wdl-lint/tests/lints/command-mixed/source.errors b/wdl-lint/tests/lints/command-mixed/source.errors index e250ad0b..1e525ce4 100644 --- a/wdl-lint/tests/lints/command-mixed/source.errors +++ b/wdl-lint/tests/lints/command-mixed/source.errors @@ -1,19 +1,19 @@ warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed/source.wdl:11:3 + ┌─ tests/lints/command-mixed/source.wdl:12:3 │ -10 │ command <<< +11 │ command <<< │ ------- this command section uses both tabs and spaces in leading whitespace -11 │ this line has both tabs and spaces +12 │ this line has both tabs and spaces │ ^ indented with tabs until this space │ = fix: use the same whitespace character for indentation warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed/source.wdl:23:3 + ┌─ tests/lints/command-mixed/source.wdl:24:3 │ -22 │ command { +23 │ command { │ ------- this command section uses both tabs and spaces in leading whitespace -23 │ this line has both tabs and spaces +24 │ this line has both tabs and spaces │ ^ indented with tabs until this space │ = fix: use the same whitespace character for indentation diff --git a/wdl-lint/tests/lints/command-mixed/source.wdl b/wdl-lint/tests/lints/command-mixed/source.wdl index ad4f0749..e4ada0a4 100644 --- a/wdl-lint/tests/lints/command-mixed/source.wdl +++ b/wdl-lint/tests/lints/command-mixed/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, LineWidth, NoCurlyCommands, DescriptionMissing, RuntimeSectionKeys + ## This is a test of having mixed indentation on the same line in command sections. version 1.1 diff --git a/wdl-lint/tests/lints/comment-whitespace/source.errors b/wdl-lint/tests/lints/comment-whitespace/source.errors index 8112b9b2..dc7d24b1 100644 --- a/wdl-lint/tests/lints/comment-whitespace/source.errors +++ b/wdl-lint/tests/lints/comment-whitespace/source.errors @@ -1,95 +1,95 @@ note[CommentWhitespace]: comment delimiter should be followed by a single space - ┌─ tests/lints/comment-whitespace/source.wdl:9:1 - │ -9 │ #a bad comment - │ ^ - │ - = fix: follow this comment delimiter with a single space + ┌─ tests/lints/comment-whitespace/source.wdl:10:1 + │ +10 │ #a bad comment + │ ^ + │ + = fix: follow this comment delimiter with a single space note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:10:5 + ┌─ tests/lints/comment-whitespace/source.wdl:11:5 │ -10 │ # another bad comment +11 │ # another bad comment │ ^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 1 levels of indentation. It should have 0 levels of indentation. note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:14:15 + ┌─ tests/lints/comment-whitespace/source.wdl:15:15 │ -14 │ workflow foo {# test in-line comment without preceding whitespace +15 │ workflow foo {# test in-line comment without preceding whitespace │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:15:11 + ┌─ tests/lints/comment-whitespace/source.wdl:16:11 │ -15 │ meta {# this is a problematic yet valid comment +16 │ meta {# this is a problematic yet valid comment │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:18:13 + ┌─ tests/lints/comment-whitespace/source.wdl:19:13 │ -18 │ input { # a bad comment +19 │ input { # a bad comment │ ^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: comment not sufficiently indented - ┌─ tests/lints/comment-whitespace/source.wdl:20:5 + ┌─ tests/lints/comment-whitespace/source.wdl:21:5 │ -20 │ # another bad comment +21 │ # another bad comment │ ^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 1 levels of indentation. It should have 2 levels of indentation. note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:21:13 + ┌─ tests/lints/comment-whitespace/source.wdl:22:13 │ -21 │ # yet another bad comment +22 │ # yet another bad comment │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 2 levels of indentation. note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:22:34 + ┌─ tests/lints/comment-whitespace/source.wdl:23:34 │ -22 │ String foo = "bar" # too much space for an inline comment +23 │ String foo = "bar" # too much space for an inline comment │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:26:15 + ┌─ tests/lints/comment-whitespace/source.wdl:27:15 │ -26 │ # what about this one? +27 │ # what about this one? │ ^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 2 levels of indentation. note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:48:17 + ┌─ tests/lints/comment-whitespace/source.wdl:49:17 │ -48 │ # even more comment +49 │ # even more comment │ ^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 4 levels of indentation. It should have 3 levels of indentation. note[CommentWhitespace]: comment not sufficiently indented - ┌─ tests/lints/comment-whitespace/source.wdl:95:13 + ┌─ tests/lints/comment-whitespace/source.wdl:96:13 │ -95 │ # This comment will flag, because the `] == [` expression is incorrect. +96 │ # This comment will flag, because the `] == [` expression is incorrect. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 4 levels of indentation. note[CommentWhitespace]: comment not sufficiently indented - ┌─ tests/lints/comment-whitespace/source.wdl:129:13 + ┌─ tests/lints/comment-whitespace/source.wdl:130:13 │ -129 │ # This comment will flag, because the `} == {` expression is incorrect. +130 │ # This comment will flag, because the `} == {` expression is incorrect. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 4 levels of indentation. diff --git a/wdl-lint/tests/lints/comment-whitespace/source.wdl b/wdl-lint/tests/lints/comment-whitespace/source.wdl index 4d216113..5e05d55a 100644 --- a/wdl-lint/tests/lints/comment-whitespace/source.wdl +++ b/wdl-lint/tests/lints/comment-whitespace/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, DisallowedOutputName, ExpressionSpacing, LineWidth, MissingMetas, NonmatchingOutput, TrailingComma, Whitespace + ## some comment version 1.2 diff --git a/wdl-lint/tests/lints/container-value/source.errors b/wdl-lint/tests/lints/container-value/source.errors index cfd9c5f9..9e07aef8 100644 --- a/wdl-lint/tests/lints/container-value/source.errors +++ b/wdl-lint/tests/lints/container-value/source.errors @@ -1,63 +1,63 @@ warning[ContainerValue]: container URI is missing a tag - ┌─ tests/lints/container-value/source.wdl:18:20 + ┌─ tests/lints/container-value/source.wdl:19:20 │ -18 │ container: "ubuntu" +19 │ container: "ubuntu" │ ^^^^^^^^ │ = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) note[ContainerValue]: container URI uses a mutable tag - ┌─ tests/lints/container-value/source.wdl:34:20 + ┌─ tests/lints/container-value/source.wdl:35:20 │ -34 │ container: "ubuntu:latest" +35 │ container: "ubuntu:latest" │ ^^^^^^^^^^^^^^^ │ = fix: replace the mutable tag with its SHA256 equivalent (e.g., `ubuntu@sha256:foobar` instead of `ubuntu:latest`) warning[ContainerValue]: container URI is missing a tag - ┌─ tests/lints/container-value/source.wdl:84:17 + ┌─ tests/lints/container-value/source.wdl:85:17 │ -84 │ docker: "ubuntu" +85 │ docker: "ubuntu" │ ^^^^^^^^ │ = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) note[ContainerValue]: container URI uses a mutable tag - ┌─ tests/lints/container-value/source.wdl:101:17 + ┌─ tests/lints/container-value/source.wdl:102:17 │ -101 │ docker: "ubuntu:latest" +102 │ docker: "ubuntu:latest" │ ^^^^^^^^^^^^^^^ │ = fix: replace the mutable tag with its SHA256 equivalent (e.g., `ubuntu@sha256:foobar` instead of `ubuntu:latest`) note[ContainerValue]: an array with a single value should be a string literal - ┌─ tests/lints/container-value/source.wdl:133:21 + ┌─ tests/lints/container-value/source.wdl:134:21 │ -133 │ container: ["*"] +134 │ container: ["*"] │ ^^^ │ = fix: change the array to a string literal representing the first value note[ContainerValue]: arrays containing any are ambiguous - ┌─ tests/lints/container-value/source.wdl:149:21 + ┌─ tests/lints/container-value/source.wdl:150:21 │ -149 │ container: ["*", "foo", "*", "*"] +150 │ container: ["*", "foo", "*", "*"] │ ^^^ --- --- │ = fix: remove these entries or change the array to a string literal with the value of `*` warning[ContainerValue]: container URI is missing a tag - ┌─ tests/lints/container-value/source.wdl:149:26 + ┌─ tests/lints/container-value/source.wdl:150:26 │ -149 │ container: ["*", "foo", "*", "*"] +150 │ container: ["*", "foo", "*", "*"] │ ^^^^^ │ = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) note[ContainerValue]: empty arrays are ambiguous and should contain at least one entry - ┌─ tests/lints/container-value/source.wdl:165:20 + ┌─ tests/lints/container-value/source.wdl:166:20 │ -165 │ container: [] +166 │ container: [] │ ^^ │ = fix: add an entry or remove the entry altogether diff --git a/wdl-lint/tests/lints/container-value/source.wdl b/wdl-lint/tests/lints/container-value/source.wdl index 49984d63..bcde34c6 100644 --- a/wdl-lint/tests/lints/container-value/source.wdl +++ b/wdl-lint/tests/lints/container-value/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, Todo, MissingRequirements + ## This is a test of the `ContainerValue` lint. version 1.2 diff --git a/wdl-lint/tests/lints/curly-command/source.errors b/wdl-lint/tests/lints/curly-command/source.errors index 96816337..5a1ec40c 100644 --- a/wdl-lint/tests/lints/curly-command/source.errors +++ b/wdl-lint/tests/lints/curly-command/source.errors @@ -1,7 +1,7 @@ warning[NoCurlyCommands]: task `bad` uses curly braces in command section - ┌─ tests/lints/curly-command/source.wdl:11:5 + ┌─ tests/lints/curly-command/source.wdl:12:5 │ -11 │ command { +12 │ command { │ ^^^^^^^ this command section uses curly braces │ = fix: instead of curly braces, use heredoc syntax (<<<>>>>) for command sections diff --git a/wdl-lint/tests/lints/curly-command/source.wdl b/wdl-lint/tests/lints/curly-command/source.wdl index fef9f21b..fb83aee6 100644 --- a/wdl-lint/tests/lints/curly-command/source.wdl +++ b/wdl-lint/tests/lints/curly-command/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, SectionOrdering, RuntimeSectionKeys + ## This is a test of the `NoCurlyCommands` lint version 1.1 diff --git a/wdl-lint/tests/lints/deprecated-object/source.errors b/wdl-lint/tests/lints/deprecated-object/source.errors index 71d8e572..611899a4 100644 --- a/wdl-lint/tests/lints/deprecated-object/source.errors +++ b/wdl-lint/tests/lints/deprecated-object/source.errors @@ -1,23 +1,23 @@ note[DeprecatedObject]: use of a deprecated `Object` type - ┌─ tests/lints/deprecated-object/source.wdl:10:9 + ┌─ tests/lints/deprecated-object/source.wdl:11:9 │ -10 │ Object an_unbound_literal_object +11 │ Object an_unbound_literal_object │ ^^^^^^ │ = fix: replace the `Object` with a `Map` or a `Struct` note[DeprecatedObject]: use of a deprecated `Object` type - ┌─ tests/lints/deprecated-object/source.wdl:13:5 + ┌─ tests/lints/deprecated-object/source.wdl:14:5 │ -13 │ Object a_bound_literal_object = object { +14 │ Object a_bound_literal_object = object { │ ^^^^^^ │ = fix: replace the `Object` with a `Map` or a `Struct` note[DeprecatedObject]: use of a deprecated `Object` type - ┌─ tests/lints/deprecated-object/source.wdl:19:9 + ┌─ tests/lints/deprecated-object/source.wdl:20:9 │ -19 │ Object another_bound_literal_object = object { +20 │ Object another_bound_literal_object = object { │ ^^^^^^ │ = fix: replace the `Object` with a `Map` or a `Struct` diff --git a/wdl-lint/tests/lints/deprecated-object/source.wdl b/wdl-lint/tests/lints/deprecated-object/source.wdl index 956a0b2c..2e49bef6 100644 --- a/wdl-lint/tests/lints/deprecated-object/source.wdl +++ b/wdl-lint/tests/lints/deprecated-object/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, MissingMetas, NonmatchingOutput, SectionOrdering + ## This is a test of the `DeprecatedObject` lint version 1.1 diff --git a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.0/source.wdl b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.0/source.wdl index 263e0708..8b06a02f 100644 --- a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.0/source.wdl +++ b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.0/source.wdl @@ -1,5 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing,RuntimeSectionKeys -## + ## This is a test of the `DeprecatedPlaceholderOption` lint. version 1.0 diff --git a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.wdl b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.wdl index f62250c9..ef171c40 100644 --- a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.wdl +++ b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.wdl @@ -1,5 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, RuntimeSectionKeys -## + ## This is a test of the `DeprecatedPlaceholderOption` lint. version 1.1 diff --git a/wdl-lint/tests/lints/description-missing/source.errors b/wdl-lint/tests/lints/description-missing/source.errors index 8ad2700e..22620e7d 100644 --- a/wdl-lint/tests/lints/description-missing/source.errors +++ b/wdl-lint/tests/lints/description-missing/source.errors @@ -1,23 +1,23 @@ note[DescriptionMissing]: task `foo` is missing a description key - ┌─ tests/lints/description-missing/source.wdl:7:5 + ┌─ tests/lints/description-missing/source.wdl:8:5 │ -7 │ meta { +8 │ meta { │ ^^^^ │ = fix: add a `description` key to this meta section note[DescriptionMissing]: workflow `bar` is missing a description key - ┌─ tests/lints/description-missing/source.wdl:23:5 + ┌─ tests/lints/description-missing/source.wdl:24:5 │ -23 │ meta { +24 │ meta { │ ^^^^ │ = fix: add a `description` key to this meta section note[DescriptionMissing]: struct `Baz` is missing a description key - ┌─ tests/lints/description-missing/source.wdl:35:5 + ┌─ tests/lints/description-missing/source.wdl:36:5 │ -35 │ meta { +36 │ meta { │ ^^^^ │ = fix: add a `description` key to this meta section diff --git a/wdl-lint/tests/lints/description-missing/source.wdl b/wdl-lint/tests/lints/description-missing/source.wdl index c7334784..519b10e6 100644 --- a/wdl-lint/tests/lints/description-missing/source.wdl +++ b/wdl-lint/tests/lints/description-missing/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, MissingRuntime, MissingOutput, MissingRequirements + ## This is a test for a missing description in a `meta` section. version 1.2 diff --git a/wdl-lint/tests/lints/double-quotes/source.errors b/wdl-lint/tests/lints/double-quotes/source.errors index 254bbb74..cb4eb7a8 100644 --- a/wdl-lint/tests/lints/double-quotes/source.errors +++ b/wdl-lint/tests/lints/double-quotes/source.errors @@ -1,27 +1,27 @@ warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/double-quotes/source.wdl:10:18 + ┌─ tests/lints/double-quotes/source.wdl:11:18 │ -10 │ String bad = 'this string is not okay' +11 │ String bad = 'this string is not okay' │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: change the single quotes to double quotes warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/double-quotes/source.wdl:13:13 + ┌─ tests/lints/double-quotes/source.wdl:14:13 │ -13 │ ╭ 'but this is not and ~{ -14 │ │ "while this one is okay ~{ -15 │ │ 'this one is not' -16 │ │ }" -17 │ │ }' +14 │ ╭ 'but this is not and ~{ +15 │ │ "while this one is okay ~{ +16 │ │ 'this one is not' +17 │ │ }" +18 │ │ }' │ ╰──────────────^ │ = fix: change the single quotes to double quotes warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/double-quotes/source.wdl:15:21 + ┌─ tests/lints/double-quotes/source.wdl:16:21 │ -15 │ 'this one is not' +16 │ 'this one is not' │ ^^^^^^^^^^^^^^^^^ │ = fix: change the single quotes to double quotes diff --git a/wdl-lint/tests/lints/double-quotes/source.wdl b/wdl-lint/tests/lints/double-quotes/source.wdl index 06390b3e..6f152b67 100644 --- a/wdl-lint/tests/lints/double-quotes/source.wdl +++ b/wdl-lint/tests/lints/double-quotes/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing + ## This is a test of the `DoubleQuotes` lint version 1.1 diff --git a/wdl-lint/tests/lints/except/source.errors b/wdl-lint/tests/lints/except/source.errors index d64ab702..d523ae68 100644 --- a/wdl-lint/tests/lints/except/source.errors +++ b/wdl-lint/tests/lints/except/source.errors @@ -7,25 +7,25 @@ note[UnknownRule]: unknown lint rule `Unknown` = fix: remove the rule from the exception list note[UnknownRule]: unknown lint rule `AlsoUnknown` - ┌─ tests/lints/except/source.wdl:21:26 + ┌─ tests/lints/except/source.wdl:22:26 │ -21 │ #@ except: SnakeCase,AlsoUnknown +22 │ #@ except: SnakeCase,AlsoUnknown │ ^^^^^^^^^^^ cannot make an exception for this rule │ = fix: remove the rule from the exception list warning[SnakeCase]: struct member name `NotOk` is not snake_case - ┌─ tests/lints/except/source.wdl:23:9 + ┌─ tests/lints/except/source.wdl:24:9 │ -23 │ Int NotOk # NOT OK +24 │ Int NotOk # NOT OK │ ^^^^^ this name must be snake_case │ = fix: replace `NotOk` with `not_ok` warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/except/source.wdl:28:18 + ┌─ tests/lints/except/source.wdl:29:18 │ -28 │ String bad = 'bad string' # NOT OK +29 │ String bad = 'bad string' # NOT OK │ ^^^^^^^^^^^^ │ = fix: change the single quotes to double quotes diff --git a/wdl-lint/tests/lints/except/source.wdl b/wdl-lint/tests/lints/except/source.wdl index 65031c98..ef7ff802 100644 --- a/wdl-lint/tests/lints/except/source.wdl +++ b/wdl-lint/tests/lints/except/source.wdl @@ -1,4 +1,5 @@ #@ except: CommentWhitespace, Whitespace, EndingNewline, Unknown + ## This is a test of the `#@ except` comments. ## The above exceptions apply to the whole file. diff --git a/wdl-lint/tests/lints/import-placements/source.errors b/wdl-lint/tests/lints/import-placements/source.errors index 99ef448f..493fdaa8 100644 --- a/wdl-lint/tests/lints/import-placements/source.errors +++ b/wdl-lint/tests/lints/import-placements/source.errors @@ -1,15 +1,15 @@ warning[ImportPlacement]: misplaced import - ┌─ tests/lints/import-placements/source.wdl:15:1 + ┌─ tests/lints/import-placements/source.wdl:16:1 │ -15 │ import "jam.wdl" # BAD +16 │ import "jam.wdl" # BAD │ ^^^^^^^^^^^^^^^^ │ = fix: move this import so that it comes after the version statement but before any document items warning[ImportPlacement]: misplaced import - ┌─ tests/lints/import-placements/source.wdl:16:1 + ┌─ tests/lints/import-placements/source.wdl:17:1 │ -16 │ import "qux.wdl" # BAD +17 │ import "qux.wdl" # BAD │ ^^^^^^^^^^^^^^^^ │ = fix: move this import so that it comes after the version statement but before any document items diff --git a/wdl-lint/tests/lints/import-placements/source.wdl b/wdl-lint/tests/lints/import-placements/source.wdl index 12eebbff..07b59bac 100644 --- a/wdl-lint/tests/lints/import-placements/source.wdl +++ b/wdl-lint/tests/lints/import-placements/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing + ## This is a test of import placements. version 1.1 diff --git a/wdl-lint/tests/lints/inconsistent-newlines/source.errors b/wdl-lint/tests/lints/inconsistent-newlines/source.errors index fabb97a4..61dff7a4 100644 --- a/wdl-lint/tests/lints/inconsistent-newlines/source.errors +++ b/wdl-lint/tests/lints/inconsistent-newlines/source.errors @@ -1,9 +1,8 @@ -note[InconsistentNewlines]: inconsistent newlines detected - ┌─ tests/lints/inconsistent-newlines/source.wdl:7:1 - │ -7 │ ╭ -8 │ │ workflow foo {} - │ ╰^ the first occurrence of a mismatched newline is here - │ - = fix: use either "/n" or "/r/n" consistently in the file +note[UnknownRule]: unknown lint rule `PreambleWhitespace` + ┌─ tests/lints/inconsistent-newlines/source.wdl:1:26 + │ +1 │ #@ except: EndingNewline,PreambleWhitespace,MissingMetas,MissingOutput + │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule + │ + = fix: remove the rule from the exception list diff --git a/wdl-lint/tests/lints/inconsistent-newlines/source.wdl b/wdl-lint/tests/lints/inconsistent-newlines/source.wdl index 0a1576cb..917ea368 100644 --- a/wdl-lint/tests/lints/inconsistent-newlines/source.wdl +++ b/wdl-lint/tests/lints/inconsistent-newlines/source.wdl @@ -1,10 +1,11 @@ #@ except: EndingNewline,PreambleWhitespace,MissingMetas,MissingOutput + ## This is a test of the `InconsistentNewlines` lint ## Note that due an inexact path separator replacement in the tests, ## error messages in the baseline will show `/` instead of `\`. version 1.1 - + workflow foo {} diff --git a/wdl-lint/tests/lints/invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/invalid-preamble-comment/source.errors index c5ff6f40..be6443c6 100644 --- a/wdl-lint/tests/lints/invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/invalid-preamble-comment/source.errors @@ -1,15 +1,15 @@ -note[PreambleComments]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/invalid-preamble-comment/source.wdl:2:1 +note[PreambleFormatting]: preamble comments must start with `##` followed by a space + ┌─ tests/lints/invalid-preamble-comment/source.wdl:3:1 │ -2 │ # This is an invalid preamble comment. +3 │ # This is an invalid preamble comment. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: change each preamble comment to start with `##` followed by a space -note[PreambleComments]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/invalid-preamble-comment/source.wdl:4:1 +note[PreambleFormatting]: preamble comments must start with `##` followed by a space + ┌─ tests/lints/invalid-preamble-comment/source.wdl:5:1 │ -4 │ # This one is invalid too! +5 │ # This one is invalid too! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: change each preamble comment to start with `##` followed by a space diff --git a/wdl-lint/tests/lints/invalid-preamble-comment/source.wdl b/wdl-lint/tests/lints/invalid-preamble-comment/source.wdl index 8d199f87..4a5e74ef 100644 --- a/wdl-lint/tests/lints/invalid-preamble-comment/source.wdl +++ b/wdl-lint/tests/lints/invalid-preamble-comment/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + # This is an invalid preamble comment. ## This one is fine # This one is invalid too! diff --git a/wdl-lint/tests/lints/matching-param-meta/source.errors b/wdl-lint/tests/lints/matching-param-meta/source.errors index 00056a79..78349757 100644 --- a/wdl-lint/tests/lints/matching-param-meta/source.errors +++ b/wdl-lint/tests/lints/matching-param-meta/source.errors @@ -1,31 +1,31 @@ warning[MatchingParameterMeta]: task `t` is missing a parameter metadata key for input `does_not_exist` - ┌─ tests/lints/matching-param-meta/source.wdl:11:16 + ┌─ tests/lints/matching-param-meta/source.wdl:12:16 │ -11 │ String does_not_exist +12 │ String does_not_exist │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section │ = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. note[MatchingParameterMeta]: task `t` has an extraneous parameter metadata key named `extra` - ┌─ tests/lints/matching-param-meta/source.wdl:23:9 + ┌─ tests/lints/matching-param-meta/source.wdl:24:9 │ -23 │ extra: "this should not be here" +24 │ extra: "this should not be here" │ ^^^^^ this key does not correspond to any input declaration │ = fix: remove the extraneous parameter metadata entry warning[MatchingParameterMeta]: workflow `w` is missing a parameter metadata key for input `does_not_exist` - ┌─ tests/lints/matching-param-meta/source.wdl:36:16 + ┌─ tests/lints/matching-param-meta/source.wdl:37:16 │ -36 │ String does_not_exist +37 │ String does_not_exist │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section │ = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. note[MatchingParameterMeta]: workflow `w` has an extraneous parameter metadata key named `extra` - ┌─ tests/lints/matching-param-meta/source.wdl:48:9 + ┌─ tests/lints/matching-param-meta/source.wdl:49:9 │ -48 │ extra: "this should not be here" +49 │ extra: "this should not be here" │ ^^^^^ this key does not correspond to any input declaration │ = fix: remove the extraneous parameter metadata entry diff --git a/wdl-lint/tests/lints/matching-param-meta/source.wdl b/wdl-lint/tests/lints/matching-param-meta/source.wdl index 03666c5f..8ce14fc1 100644 --- a/wdl-lint/tests/lints/matching-param-meta/source.wdl +++ b/wdl-lint/tests/lints/matching-param-meta/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, RuntimeSectionKeys, SectionOrdering, TrailingComma + ## This is a test for checking for missing and extraneous entries ## in a `parameter_meta` section. diff --git a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors index cf611404..e69de29b 100644 --- a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors +++ b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors @@ -1,8 +0,0 @@ -note[PreambleWhitespace]: expected a blank line after the version statement - ┌─ tests/lints/missing-blank-line-after-version/source.wdl:5:1 - │ -5 │ workflow test { - │ ^ add a blank line before this - │ - = fix: add a blank line immediately after the version statement - diff --git a/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl b/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl index 130c70ca..57f5345c 100644 --- a/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl +++ b/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of a missing blank line following the version statement. version 1.1 diff --git a/wdl-lint/tests/lints/missing-comment-space/source.errors b/wdl-lint/tests/lints/missing-comment-space/source.errors index e52acc1a..f12d83b8 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.errors +++ b/wdl-lint/tests/lints/missing-comment-space/source.errors @@ -1,7 +1,7 @@ -note[PreambleComments]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/missing-comment-space/source.wdl:2:1 +note[PreambleFormatting]: preamble comments must start with `##` followed by a space + ┌─ tests/lints/missing-comment-space/source.wdl:3:1 │ -2 │ ##This preamble comment is missing a space. +3 │ ##This preamble comment is missing a space. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: change each preamble comment to start with `##` followed by a space diff --git a/wdl-lint/tests/lints/missing-comment-space/source.wdl b/wdl-lint/tests/lints/missing-comment-space/source.wdl index fc8ee998..521e41d2 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.wdl +++ b/wdl-lint/tests/lints/missing-comment-space/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing + ##This preamble comment is missing a space. ## ## But this one isn't and neither are the empty ones diff --git a/wdl-lint/tests/lints/missing-eof-newline/source.errors b/wdl-lint/tests/lints/missing-eof-newline/source.errors index 26cb7884..b75df4b4 100644 --- a/wdl-lint/tests/lints/missing-eof-newline/source.errors +++ b/wdl-lint/tests/lints/missing-eof-newline/source.errors @@ -1,8 +1,8 @@ warning[EndingNewline]: missing newline at the end of the file - ┌─ tests/lints/missing-eof-newline/source.wdl:9:1 - │ -9 │ } - │ ^ expected a newline to follow this - │ - = fix: add an empty line at the end of the file + ┌─ tests/lints/missing-eof-newline/source.wdl:10:1 + │ +10 │ } + │ ^ expected a newline to follow this + │ + = fix: add an empty line at the end of the file diff --git a/wdl-lint/tests/lints/missing-eof-newline/source.wdl b/wdl-lint/tests/lints/missing-eof-newline/source.wdl index c38f14f1..4ac90817 100644 --- a/wdl-lint/tests/lints/missing-eof-newline/source.wdl +++ b/wdl-lint/tests/lints/missing-eof-newline/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of a missing EOF newline lint version 1.1 diff --git a/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.errors b/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.errors index aa3f11fb..0b1f3fe1 100644 --- a/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.errors +++ b/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.errors @@ -1,7 +1,7 @@ note[MissingMetas]: workflow `test` is missing both meta and parameter_meta sections - ┌─ tests/lints/missing-meta-and-parameter_meta/source.wdl:6:10 + ┌─ tests/lints/missing-meta-and-parameter_meta/source.wdl:7:10 │ -6 │ workflow test { +7 │ workflow test { │ ^^^^ this workflow is missing both meta and parameter_meta sections │ = fix: add meta and parameter_meta sections to the workflow diff --git a/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.wdl b/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.wdl index 1d736181..e0ddbe09 100644 --- a/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.wdl +++ b/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DisallowedInputName, DisallowedOutputName + ## This is a test of missing both the meta and parameter_meta version 1.0 diff --git a/wdl-lint/tests/lints/missing-preamble-ws/source.errors b/wdl-lint/tests/lints/missing-preamble-ws/source.errors index 0c32e16b..e69de29b 100644 --- a/wdl-lint/tests/lints/missing-preamble-ws/source.errors +++ b/wdl-lint/tests/lints/missing-preamble-ws/source.errors @@ -1,10 +0,0 @@ -note[PreambleWhitespace]: expected a blank line before the version statement - ┌─ tests/lints/missing-preamble-ws/source.wdl:2:50 - │ -2 │ ## This is a test of missing preamble whitespace. - │ ╭─────────────────────────────────────────────────^ -3 │ │ version 1.1 - │ ╰^ - │ - = fix: add a blank line between the last preamble comment and the version statement - diff --git a/wdl-lint/tests/lints/missing-preamble-ws/source.wdl b/wdl-lint/tests/lints/missing-preamble-ws/source.wdl index 183518b3..478fed79 100644 --- a/wdl-lint/tests/lints/missing-preamble-ws/source.wdl +++ b/wdl-lint/tests/lints/missing-preamble-ws/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of missing preamble whitespace. version 1.1 diff --git a/wdl-lint/tests/lints/missing-runtime-block/source.errors b/wdl-lint/tests/lints/missing-runtime-block/source.errors index 0f917ca0..8d66444a 100644 --- a/wdl-lint/tests/lints/missing-runtime-block/source.errors +++ b/wdl-lint/tests/lints/missing-runtime-block/source.errors @@ -1,7 +1,7 @@ warning[MissingRuntime]: task `bad` is missing a `runtime` section - ┌─ tests/lints/missing-runtime-block/source.wdl:7:6 + ┌─ tests/lints/missing-runtime-block/source.wdl:8:6 │ -7 │ task bad { +8 │ task bad { │ ^^^ this task is missing a `runtime` section │ = fix: add a `runtime` section to the task diff --git a/wdl-lint/tests/lints/missing-runtime-block/source.wdl b/wdl-lint/tests/lints/missing-runtime-block/source.wdl index 896a4ebd..40413920 100644 --- a/wdl-lint/tests/lints/missing-runtime-block/source.wdl +++ b/wdl-lint/tests/lints/missing-runtime-block/source.wdl @@ -1,5 +1,6 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, RuntimeSectionKeys #@ except: SectionOrdering + ## This is a test of the `missing_runtime_block` lint version 1.1 diff --git a/wdl-lint/tests/lints/multiple-eof-newline/source.errors b/wdl-lint/tests/lints/multiple-eof-newline/source.errors index 26447eba..65b13295 100644 --- a/wdl-lint/tests/lints/multiple-eof-newline/source.errors +++ b/wdl-lint/tests/lints/multiple-eof-newline/source.errors @@ -1,14 +1,14 @@ warning[EndingNewline]: multiple empty lines at the end of file - ┌─ tests/lints/multiple-eof-newline/source.wdl:10:2 + ┌─ tests/lints/multiple-eof-newline/source.wdl:11:2 │ -10 │ } +11 │ } │ ╭─^ -11 │ │ 12 │ │ 13 │ │ 14 │ │ 15 │ │ 16 │ │ +17 │ │ │ ╰^ duplicate newlines here │ = fix: remove all but one empty line at the end of the file diff --git a/wdl-lint/tests/lints/multiple-eof-newline/source.wdl b/wdl-lint/tests/lints/multiple-eof-newline/source.wdl index 7931064b..f5c7570d 100644 --- a/wdl-lint/tests/lints/multiple-eof-newline/source.wdl +++ b/wdl-lint/tests/lints/multiple-eof-newline/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of multiple EOF newlines lint version 1.1 diff --git a/wdl-lint/tests/lints/one-eof-newline/source.wdl b/wdl-lint/tests/lints/one-eof-newline/source.wdl index 9a44b9fc..ef7ed213 100644 --- a/wdl-lint/tests/lints/one-eof-newline/source.wdl +++ b/wdl-lint/tests/lints/one-eof-newline/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of the missing EOF newline lint ## `source.errors` should be empty diff --git a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors index bedca7f1..19b73c83 100644 --- a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors @@ -1,13 +1,21 @@ -note[PreambleComments]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/one-invalid-preamble-comment/source.wdl:2:1 +note[UnknownRule]: unknown lint rule `PreambleWhitespace` + ┌─ tests/lints/one-invalid-preamble-comment/source.wdl:1:59 + │ +1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing, PreambleWhitespace + │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule + │ + = fix: remove the rule from the exception list + +note[PreambleFormatting]: preamble comments must start with `##` followed by a space + ┌─ tests/lints/one-invalid-preamble-comment/source.wdl:3:1 │ - 2 │ ╭ # This is a test of having one big invalid preamble comment. - 3 │ │ # - 4 │ │ - 5 │ │ # All of the lines + 3 │ ╭ # This is a test of having one big invalid preamble comment. + 4 │ │ # + 5 │ │ + 6 │ │ # All of the lines · │ -11 │ │ # as a single diagnostic -12 │ │ # warning +12 │ │ # as a single diagnostic +13 │ │ # warning │ ╰─────────^ │ = fix: change each preamble comment to start with `##` followed by a space diff --git a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl index 4daed96f..56f63646 100644 --- a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl +++ b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, PreambleWhitespace + # This is a test of having one big invalid preamble comment. # diff --git a/wdl-lint/tests/lints/only-whitespace/source.errors b/wdl-lint/tests/lints/only-whitespace/source.errors index fba5db28..9e0e2f07 100644 --- a/wdl-lint/tests/lints/only-whitespace/source.errors +++ b/wdl-lint/tests/lints/only-whitespace/source.errors @@ -1,58 +1,58 @@ warning[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:7:1 + ┌─ tests/lints/only-whitespace/source.wdl:8:1 │ -7 │ +8 │ │ ^^^^ │ = fix: remove the whitespace from this line warning[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:10:1 + ┌─ tests/lints/only-whitespace/source.wdl:11:1 │ -10 │ +11 │ │ ^^^^^^^^^^ │ = fix: remove the whitespace from this line warning[Whitespace]: more than one blank line in a row - ┌─ tests/lints/only-whitespace/source.wdl:10:1 + ┌─ tests/lints/only-whitespace/source.wdl:11:1 │ -10 │ ╭ -11 │ │ +11 │ ╭ 12 │ │ -13 │ │ workflow test { +13 │ │ +14 │ │ workflow test { │ ╰^ │ = fix: remove the unnecessary blank lines warning[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/only-whitespace/source.wdl:13:16 + ┌─ tests/lints/only-whitespace/source.wdl:14:16 │ -13 │ workflow test { +14 │ workflow test { │ ^^^^ │ = fix: remove the trailing whitespace from this line warning[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:14:1 + ┌─ tests/lints/only-whitespace/source.wdl:15:1 │ -14 │ +15 │ │ ^^^^ │ = fix: remove the whitespace from this line warning[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/only-whitespace/source.wdl:18:18 + ┌─ tests/lints/only-whitespace/source.wdl:19:18 │ -18 │ String x = "" +19 │ String x = "" │ ^^^^^^^^^^^ │ = fix: remove the trailing whitespace from this line warning[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:20:1 + ┌─ tests/lints/only-whitespace/source.wdl:21:1 │ -20 │ +21 │ │ ^^^^^ │ = fix: remove the whitespace from this line diff --git a/wdl-lint/tests/lints/only-whitespace/source.wdl b/wdl-lint/tests/lints/only-whitespace/source.wdl index 6f21cdbb..11ec0e54 100644 --- a/wdl-lint/tests/lints/only-whitespace/source.wdl +++ b/wdl-lint/tests/lints/only-whitespace/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, SectionOrdering + ## This is a test of lines that only contain whitespace version 1.1 diff --git a/wdl-lint/tests/lints/preamble-comment-after-version/source.errors b/wdl-lint/tests/lints/preamble-comment-after-version/source.errors index e25d6a42..0e38aec8 100644 --- a/wdl-lint/tests/lints/preamble-comment-after-version/source.errors +++ b/wdl-lint/tests/lints/preamble-comment-after-version/source.errors @@ -1,28 +1,8 @@ -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/preamble-comment-after-version/source.wdl:3:1 +note[PreambleFormatting]: unnecessary whitespace in document preamble + ┌─ tests/lints/preamble-comment-after-version/source.wdl:4:1 │ -3 │ ## Bad leading whitespace! +4 │ ## Bad leading whitespace! │ ^^^^^^^ │ = fix: remove the unnecessary whitespace -note[PreambleComments]: preamble comments cannot come after the version statement - ┌─ tests/lints/preamble-comment-after-version/source.wdl:7:1 - │ - 7 │ ╭ ## This is a preamble comment after the version - 8 │ │ - 9 │ │ ## Also a preamble comment -10 │ │ -11 │ │ ## And this one is bad too! - │ ╰───────────────────────────^ - │ - = fix: change each comment to start with `#` followed by a space - -note[PreambleComments]: preamble comments cannot come after the version statement - ┌─ tests/lints/preamble-comment-after-version/source.wdl:20:5 - │ -20 │ ## This one is bad! - │ ^^^^^^^^^^^^^^^^^^^ - │ - = fix: change each comment to start with `#` followed by a space - diff --git a/wdl-lint/tests/lints/preamble-comment-after-version/source.wdl b/wdl-lint/tests/lints/preamble-comment-after-version/source.wdl index 0bf5fbc1..685f749c 100644 --- a/wdl-lint/tests/lints/preamble-comment-after-version/source.wdl +++ b/wdl-lint/tests/lints/preamble-comment-after-version/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing + ## This is a normal preamble comment. ## Bad leading whitespace! diff --git a/wdl-lint/tests/lints/preamble-ws/source.errors b/wdl-lint/tests/lints/preamble-ws/source.errors index e9fd11fb..65f7e6db 100644 --- a/wdl-lint/tests/lints/preamble-ws/source.errors +++ b/wdl-lint/tests/lints/preamble-ws/source.errors @@ -1,16 +1,10 @@ -note[PreambleWhitespace]: expected a blank line before the version statement - ┌─ tests/lints/preamble-ws/source.wdl:3:1 - │ -3 │ version 1.1 - │ ^ - │ - = fix: add a blank line between the last preamble comment and the version statement - -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/preamble-ws/source.wdl:3:1 - │ -3 │ version 1.1 - │ ^^^^^^^^ - │ - = fix: remove the unnecessary whitespace +note[PreambleFormatting]: expected exactly one blank line between lint directives and preamble comments + ┌─ tests/lints/preamble-ws/source.wdl:1:57 + │ +1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing + │ ╭────────────────────────────────────────────────────────^ +2 │ │ ## This is a test of both missing and extraneous preamble whitespace. + │ ╰^ + │ + = fix: add a blank line between the last lint directive and the first preamble comment diff --git a/wdl-lint/tests/lints/snake-case/source.errors b/wdl-lint/tests/lints/snake-case/source.errors index 04858c21..0d76f016 100644 --- a/wdl-lint/tests/lints/snake-case/source.errors +++ b/wdl-lint/tests/lints/snake-case/source.errors @@ -1,47 +1,47 @@ warning[SnakeCase]: workflow name `BadWorkflow` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:6:10 + ┌─ tests/lints/snake-case/source.wdl:7:10 │ -6 │ workflow BadWorkflow { +7 │ workflow BadWorkflow { │ ^^^^^^^^^^^ this name must be snake_case │ = fix: replace `BadWorkflow` with `bad_workflow` warning[SnakeCase]: private declaration name `badPrivateDecl` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:9:11 - │ -9 │ Float badPrivateDecl = 3.14 - │ ^^^^^^^^^^^^^^ this name must be snake_case - │ - = fix: replace `badPrivateDecl` with `bad_private_decl` + ┌─ tests/lints/snake-case/source.wdl:10:11 + │ +10 │ Float badPrivateDecl = 3.14 + │ ^^^^^^^^^^^^^^ this name must be snake_case + │ + = fix: replace `badPrivateDecl` with `bad_private_decl` warning[SnakeCase]: task name `BadTask` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:14:6 + ┌─ tests/lints/snake-case/source.wdl:15:6 │ -14 │ task BadTask { +15 │ task BadTask { │ ^^^^^^^ this name must be snake_case │ = fix: replace `BadTask` with `bad_task` warning[SnakeCase]: input name `BadInput` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:18:16 + ┌─ tests/lints/snake-case/source.wdl:19:16 │ -18 │ String BadInput +19 │ String BadInput │ ^^^^^^^^ this name must be snake_case │ = fix: replace `BadInput` with `bad_input` warning[SnakeCase]: output name `badOut` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:31:14 + ┌─ tests/lints/snake-case/source.wdl:32:14 │ -31 │ File badOut = "out.txt" +32 │ File badOut = "out.txt" │ ^^^^^^ this name must be snake_case │ = fix: replace `badOut` with `bad_out` warning[SnakeCase]: struct member name `bAdFiElD` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:60:12 + ┌─ tests/lints/snake-case/source.wdl:61:12 │ -60 │ String bAdFiElD # unfortunately, `convert-case` doesn't understand sarcasm case +61 │ String bAdFiElD # unfortunately, `convert-case` doesn't understand sarcasm case │ ^^^^^^^^ this name must be snake_case │ = fix: replace `bAdFiElD` with `b_ad_fi_el_d` diff --git a/wdl-lint/tests/lints/snake-case/source.wdl b/wdl-lint/tests/lints/snake-case/source.wdl index 153bf328..ef86a096 100644 --- a/wdl-lint/tests/lints/snake-case/source.wdl +++ b/wdl-lint/tests/lints/snake-case/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NonmatchingOutput, SectionOrdering, RuntimeSectionKeys + ## Test SnakeCase rule version 1.0 diff --git a/wdl-lint/tests/lints/struct-matching-param-meta/source.errors b/wdl-lint/tests/lints/struct-matching-param-meta/source.errors index b8d147da..f8edc871 100644 --- a/wdl-lint/tests/lints/struct-matching-param-meta/source.errors +++ b/wdl-lint/tests/lints/struct-matching-param-meta/source.errors @@ -1,15 +1,15 @@ warning[MatchingParameterMeta]: struct `Text` is missing a parameter metadata key for input `does_not_exist` - ┌─ tests/lints/struct-matching-param-meta/source.wdl:9:12 - │ -9 │ String does_not_exist - │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section - │ - = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. + ┌─ tests/lints/struct-matching-param-meta/source.wdl:10:12 + │ +10 │ String does_not_exist + │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section + │ + = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. note[MatchingParameterMeta]: struct `Text` has an extraneous parameter metadata key named `extra` - ┌─ tests/lints/struct-matching-param-meta/source.wdl:24:9 + ┌─ tests/lints/struct-matching-param-meta/source.wdl:25:9 │ -24 │ extra: "this should not be here" +25 │ extra: "this should not be here" │ ^^^^^ this key does not correspond to any input declaration │ = fix: remove the extraneous parameter metadata entry diff --git a/wdl-lint/tests/lints/struct-matching-param-meta/source.wdl b/wdl-lint/tests/lints/struct-matching-param-meta/source.wdl index 860a5785..08cf7cc0 100644 --- a/wdl-lint/tests/lints/struct-matching-param-meta/source.wdl +++ b/wdl-lint/tests/lints/struct-matching-param-meta/source.wdl @@ -1,4 +1,5 @@ #@ except: TrailingComma + ## This is a test for checking for missing and extraneous entries ## in a `parameter_meta` section for a struct. diff --git a/wdl-lint/tests/lints/todo/source.errors b/wdl-lint/tests/lints/todo/source.errors index 5e98e412..9dac03d2 100755 --- a/wdl-lint/tests/lints/todo/source.errors +++ b/wdl-lint/tests/lints/todo/source.errors @@ -1,23 +1,23 @@ note[Todo]: remaining `TODO` item found - ┌─ tests/lints/todo/source.wdl:6:3 + ┌─ tests/lints/todo/source.wdl:7:3 │ -6 │ # TODO: this should be flagged +7 │ # TODO: this should be flagged │ ^^^^ │ = fix: implement this todo item and remove the `TODO` statement note[Todo]: remaining `TODO` item found - ┌─ tests/lints/todo/source.wdl:7:4 + ┌─ tests/lints/todo/source.wdl:8:4 │ -7 │ # [TODO] this should be flagged +8 │ # [TODO] this should be flagged │ ^^^^ │ = fix: implement this todo item and remove the `TODO` statement note[Todo]: remaining `TODO` item found - ┌─ tests/lints/todo/source.wdl:10:31 + ┌─ tests/lints/todo/source.wdl:11:31 │ -10 │ # This should be flagged (TODO). +11 │ # This should be flagged (TODO). │ ^^^^ │ = fix: implement this todo item and remove the `TODO` statement diff --git a/wdl-lint/tests/lints/todo/source.wdl b/wdl-lint/tests/lints/todo/source.wdl index e51342e9..34bb76dc 100644 --- a/wdl-lint/tests/lints/todo/source.wdl +++ b/wdl-lint/tests/lints/todo/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of the todo rule. version 1.1 diff --git a/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors b/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors index 14a0db24..8505ae40 100644 --- a/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors +++ b/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors @@ -1,15 +1,15 @@ -note[PreambleComments]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/too-many-pounds-preamble/source.wdl:2:1 +note[PreambleFormatting]: preamble comments must start with `##` followed by a space + ┌─ tests/lints/too-many-pounds-preamble/source.wdl:3:1 │ -2 │ ### This comment has too many pound signs! +3 │ ### This comment has too many pound signs! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: change each preamble comment to start with `##` followed by a space -note[PreambleComments]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/too-many-pounds-preamble/source.wdl:4:1 +note[PreambleFormatting]: preamble comments must start with `##` followed by a space + ┌─ tests/lints/too-many-pounds-preamble/source.wdl:5:1 │ -4 │ ###### This comment also has too many pound signs! +5 │ ###### This comment also has too many pound signs! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: change each preamble comment to start with `##` followed by a space diff --git a/wdl-lint/tests/lints/too-many-pounds-preamble/source.wdl b/wdl-lint/tests/lints/too-many-pounds-preamble/source.wdl index 88a1afe4..275d41fa 100644 --- a/wdl-lint/tests/lints/too-many-pounds-preamble/source.wdl +++ b/wdl-lint/tests/lints/too-many-pounds-preamble/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ### This comment has too many pound signs! ## This one is fine though. ###### This comment also has too many pound signs! diff --git a/wdl-lint/tests/lints/two-eof-newline/source.errors b/wdl-lint/tests/lints/two-eof-newline/source.errors index 20d590dc..7cb82cb5 100644 --- a/wdl-lint/tests/lints/two-eof-newline/source.errors +++ b/wdl-lint/tests/lints/two-eof-newline/source.errors @@ -1,9 +1,9 @@ warning[EndingNewline]: multiple empty lines at the end of file - ┌─ tests/lints/two-eof-newline/source.wdl:9:2 + ┌─ tests/lints/two-eof-newline/source.wdl:10:2 │ - 9 │ } +10 │ } │ ╭─^ -10 │ │ +11 │ │ │ ╰^ duplicate newline here │ = fix: remove all but one empty line at the end of the file diff --git a/wdl-lint/tests/lints/two-eof-newline/source.wdl b/wdl-lint/tests/lints/two-eof-newline/source.wdl index 2d182d91..bdc114bf 100644 --- a/wdl-lint/tests/lints/two-eof-newline/source.wdl +++ b/wdl-lint/tests/lints/two-eof-newline/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of two EOF newlines lint version 1.1 diff --git a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors index bcc22213..e69de29b 100644 --- a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors +++ b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors @@ -1,18 +0,0 @@ -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/unnecessary-preamble-ws/source.wdl:5:1 - │ -5 │ - │ ^^^^^^^^^^^ - │ - = fix: remove the unnecessary whitespace - -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/unnecessary-preamble-ws/source.wdl:6:1 - │ -6 │ ╭ -7 │ │ -8 │ │ version 1.1 - │ ╰──^ - │ - = fix: remove the unnecessary whitespace - diff --git a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.wdl b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.wdl index 52547de1..97e23009 100644 --- a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.wdl +++ b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of ensuring that we print two diagnostics: ## The first is for the whitespace following the last comment ## The second is for the whitespace between the end of that line to the version keyword diff --git a/wdl-lint/tests/lints/within-import-whitespace/source.errors b/wdl-lint/tests/lints/within-import-whitespace/source.errors index 20abe280..15327ea1 100644 --- a/wdl-lint/tests/lints/within-import-whitespace/source.errors +++ b/wdl-lint/tests/lints/within-import-whitespace/source.errors @@ -1,71 +1,71 @@ note[ImportSort]: imports are not sorted lexicographically - ┌─ tests/lints/within-import-whitespace/source.wdl:8:1 + ┌─ tests/lints/within-import-whitespace/source.wdl:9:1 │ -8 │ import "bar" # BAD (2 spaces) +9 │ import "bar" # BAD (2 spaces) │ ^^^^^^^^^^^^^ │ = fix: sort the imports lexicographically note[ImportWhitespace]: improper whitespace in import statement - ┌─ tests/lints/within-import-whitespace/source.wdl:8:7 + ┌─ tests/lints/within-import-whitespace/source.wdl:9:7 │ -8 │ import "bar" # BAD (2 spaces) +9 │ import "bar" # BAD (2 spaces) │ ^^ this should be a singular space (` `) │ = fix: use minimal whitespace within import statements note[ImportWhitespace]: improper whitespace in import statement - ┌─ tests/lints/within-import-whitespace/source.wdl:9:7 - │ -9 │ import "baz" # BAD (tab literal) - │ ^^ this should be a singular space (` `) - │ - = fix: use minimal whitespace within import statements + ┌─ tests/lints/within-import-whitespace/source.wdl:10:7 + │ +10 │ import "baz" # BAD (tab literal) + │ ^^ this should be a singular space (` `) + │ + = fix: use minimal whitespace within import statements note[ImportWhitespace]: improper whitespace in import statement - ┌─ tests/lints/within-import-whitespace/source.wdl:10:14 + ┌─ tests/lints/within-import-whitespace/source.wdl:11:14 │ -10 │ import "chuk" as something # BAD (many spaces) +11 │ import "chuk" as something # BAD (many spaces) │ ^^^^^^^^ this should be a singular space (` `) │ = fix: use minimal whitespace within import statements note[ImportWhitespace]: improper whitespace in import statement - ┌─ tests/lints/within-import-whitespace/source.wdl:11:18 + ┌─ tests/lints/within-import-whitespace/source.wdl:12:18 │ -11 │ import "lorem" as ipsum # BAD (space and tab) +12 │ import "lorem" as ipsum # BAD (space and tab) │ ^^^ this should be a singular space (` `) │ = fix: use minimal whitespace within import statements note[ImportWhitespace]: improper whitespace in import statement - ┌─ tests/lints/within-import-whitespace/source.wdl:12:7 + ┌─ tests/lints/within-import-whitespace/source.wdl:13:7 │ -12 │ import "qux" alias jabber as quux # really BAD +13 │ import "qux" alias jabber as quux # really BAD │ ^^^ this should be a singular space (` `) │ = fix: use minimal whitespace within import statements note[ImportWhitespace]: improper whitespace in import statement - ┌─ tests/lints/within-import-whitespace/source.wdl:12:15 + ┌─ tests/lints/within-import-whitespace/source.wdl:13:15 │ -12 │ import "qux" alias jabber as quux # really BAD +13 │ import "qux" alias jabber as quux # really BAD │ ^^ this should be a singular space (` `) │ = fix: use minimal whitespace within import statements note[ImportWhitespace]: improper whitespace in import statement - ┌─ tests/lints/within-import-whitespace/source.wdl:13:7 + ┌─ tests/lints/within-import-whitespace/source.wdl:14:7 │ -13 │ import # BAD (comment within statement) +14 │ import # BAD (comment within statement) │ ^^ this should be a singular space (` `) │ = fix: use minimal whitespace within import statements note[ImportSort]: comments are not allowed within an import statement - ┌─ tests/lints/within-import-whitespace/source.wdl:13:9 + ┌─ tests/lints/within-import-whitespace/source.wdl:14:9 │ -13 │ import # BAD (comment within statement) +14 │ import # BAD (comment within statement) │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: remove the comment from the import statement diff --git a/wdl-lint/tests/lints/within-import-whitespace/source.wdl b/wdl-lint/tests/lints/within-import-whitespace/source.wdl index 848bebfa..27623ffb 100644 --- a/wdl-lint/tests/lints/within-import-whitespace/source.wdl +++ b/wdl-lint/tests/lints/within-import-whitespace/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of whitespace within import statements and sort order. ## There should only ever be one diagnostic reported for a bad sort order. diff --git a/wdl-lint/tests/lints/ws-after-blank-line/source.errors b/wdl-lint/tests/lints/ws-after-blank-line/source.errors index 0cad82eb..e69de29b 100644 --- a/wdl-lint/tests/lints/ws-after-blank-line/source.errors +++ b/wdl-lint/tests/lints/ws-after-blank-line/source.errors @@ -1,9 +0,0 @@ -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/ws-after-blank-line/source.wdl:4:1 - │ -4 │ ╭ -5 │ │ version 1.1 - │ ╰^ - │ - = fix: remove the unnecessary whitespace - diff --git a/wdl-lint/tests/lints/ws-after-blank-line/source.wdl b/wdl-lint/tests/lints/ws-after-blank-line/source.wdl index 87f38463..6bf6707c 100644 --- a/wdl-lint/tests/lints/ws-after-blank-line/source.wdl +++ b/wdl-lint/tests/lints/ws-after-blank-line/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of whitespace after a blank line. diff --git a/wdl-lint/tests/lints/ws-before-version/source.errors b/wdl-lint/tests/lints/ws-before-version/source.errors index 6393047f..e69de29b 100644 --- a/wdl-lint/tests/lints/ws-before-version/source.errors +++ b/wdl-lint/tests/lints/ws-before-version/source.errors @@ -1,18 +0,0 @@ -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/ws-before-version/source.wdl:2:1 - │ -2 │ - │ ^^^^ - │ - = fix: remove the unnecessary whitespace - -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/ws-before-version/source.wdl:3:1 - │ -3 │ ╭ -4 │ │ -5 │ │ version 1.1 - │ ╰────^ - │ - = fix: remove the unnecessary whitespace - diff --git a/wdl-lint/tests/lints/ws-preamble-comments/source.errors b/wdl-lint/tests/lints/ws-preamble-comments/source.errors index 63a7b80f..e5f855c3 100644 --- a/wdl-lint/tests/lints/ws-preamble-comments/source.errors +++ b/wdl-lint/tests/lints/ws-preamble-comments/source.errors @@ -1,18 +1,18 @@ -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/ws-preamble-comments/source.wdl:3:1 +note[PreambleFormatting]: unnecessary whitespace in document preamble + ┌─ tests/lints/ws-preamble-comments/source.wdl:4:1 │ -3 │ ╭ -4 │ │ -5 │ │ ## The above lines should be a warning, as well as below +4 │ ╭ +5 │ │ +6 │ │ ## The above lines should be a warning, as well as below │ ╰^ │ = fix: remove the unnecessary whitespace -note[PreambleWhitespace]: unnecessary whitespace in document preamble - ┌─ tests/lints/ws-preamble-comments/source.wdl:6:1 +note[PreambleFormatting]: unnecessary whitespace in document preamble + ┌─ tests/lints/ws-preamble-comments/source.wdl:7:1 │ -6 │ ╭ -7 │ │ ## Last comment +7 │ ╭ +8 │ │ ## Last comment │ ╰^ │ = fix: remove the unnecessary whitespace diff --git a/wdl-lint/tests/lints/ws-preamble-comments/source.wdl b/wdl-lint/tests/lints/ws-preamble-comments/source.wdl index 90012e5c..a2386302 100644 --- a/wdl-lint/tests/lints/ws-preamble-comments/source.wdl +++ b/wdl-lint/tests/lints/ws-preamble-comments/source.wdl @@ -1,4 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing + ## This is a test of whitespace between preamble comments From ea25283f9d6426bd6f9c8e2bedc1ea3bc575ea88 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 16 Sep 2024 14:56:01 -0400 Subject: [PATCH 14/30] chore: finish cleaning merge --- wdl-lint/src/lib.rs | 3 +- wdl-lint/src/rules/preamble_formatting.rs | 4 +- .../lints/comment-whitespace/source.errors | 64 +++++++++---------- .../tests/lints/comment-whitespace/source.wdl | 3 +- wdl-lint/tests/lints/except/source.errors | 12 ++-- .../lints/missing-comment-space/source.wdl | 2 +- .../source.errors | 8 --- .../one-invalid-preamble-comment/source.wdl | 2 +- .../runtime-keys-engine-keys/source.errors | 17 ----- .../lints/runtime-keys-wdl-1.0/source.errors | 8 --- .../lints/runtime-keys-wdl-1.1/source.errors | 8 --- 11 files changed, 44 insertions(+), 87 deletions(-) diff --git a/wdl-lint/src/lib.rs b/wdl-lint/src/lib.rs index 952c9f08..dbab7b26 100644 --- a/wdl-lint/src/lib.rs +++ b/wdl-lint/src/lib.rs @@ -80,8 +80,7 @@ pub fn rules() -> Vec> { Box::::default(), Box::::default(), Box::::default(), - Box::::default(), - Box::::default(), + Box::::default(), Box::::default(), Box::::default(), Box::::default(), diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs index e3591eaa..3b2de936 100644 --- a/wdl-lint/src/rules/preamble_formatting.rs +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -177,8 +177,8 @@ impl Rule for PreambleFormattingRule { TagSet::new(&[Tag::Spacing, Tag::Style, Tag::Clarity]) } - fn exceptable_nodes(&self) -> Option> { - Some(vec![SyntaxKind::VersionStatementNode]) + fn exceptable_nodes(&self) -> Option<&'static [SyntaxKind]> { + Some(&[SyntaxKind::VersionStatementNode]) } } diff --git a/wdl-lint/tests/lints/comment-whitespace/source.errors b/wdl-lint/tests/lints/comment-whitespace/source.errors index dc7d24b1..f1fc7ebe 100644 --- a/wdl-lint/tests/lints/comment-whitespace/source.errors +++ b/wdl-lint/tests/lints/comment-whitespace/source.errors @@ -1,95 +1,95 @@ note[CommentWhitespace]: comment delimiter should be followed by a single space - ┌─ tests/lints/comment-whitespace/source.wdl:10:1 - │ -10 │ #a bad comment - │ ^ - │ - = fix: follow this comment delimiter with a single space + ┌─ tests/lints/comment-whitespace/source.wdl:8:1 + │ +8 │ #a bad comment + │ ^ + │ + = fix: follow this comment delimiter with a single space note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:11:5 - │ -11 │ # another bad comment - │ ^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: this comment has 1 levels of indentation. It should have 0 levels of indentation. + ┌─ tests/lints/comment-whitespace/source.wdl:9:5 + │ +9 │ # another bad comment + │ ^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: this comment has 1 levels of indentation. It should have 0 levels of indentation. note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:15:15 + ┌─ tests/lints/comment-whitespace/source.wdl:14:15 │ -15 │ workflow foo {# test in-line comment without preceding whitespace +14 │ workflow foo {# test in-line comment without preceding whitespace │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:16:11 + ┌─ tests/lints/comment-whitespace/source.wdl:15:11 │ -16 │ meta {# this is a problematic yet valid comment +15 │ meta {# this is a problematic yet valid comment │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:19:13 + ┌─ tests/lints/comment-whitespace/source.wdl:18:13 │ -19 │ input { # a bad comment +18 │ input { # a bad comment │ ^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: comment not sufficiently indented - ┌─ tests/lints/comment-whitespace/source.wdl:21:5 + ┌─ tests/lints/comment-whitespace/source.wdl:20:5 │ -21 │ # another bad comment +20 │ # another bad comment │ ^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 1 levels of indentation. It should have 2 levels of indentation. note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:22:13 + ┌─ tests/lints/comment-whitespace/source.wdl:21:13 │ -22 │ # yet another bad comment +21 │ # yet another bad comment │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 2 levels of indentation. note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:23:34 + ┌─ tests/lints/comment-whitespace/source.wdl:22:34 │ -23 │ String foo = "bar" # too much space for an inline comment +22 │ String foo = "bar" # too much space for an inline comment │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:27:15 + ┌─ tests/lints/comment-whitespace/source.wdl:26:15 │ -27 │ # what about this one? +26 │ # what about this one? │ ^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 2 levels of indentation. note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:49:17 + ┌─ tests/lints/comment-whitespace/source.wdl:48:17 │ -49 │ # even more comment +48 │ # even more comment │ ^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 4 levels of indentation. It should have 3 levels of indentation. note[CommentWhitespace]: comment not sufficiently indented - ┌─ tests/lints/comment-whitespace/source.wdl:96:13 + ┌─ tests/lints/comment-whitespace/source.wdl:95:13 │ -96 │ # This comment will flag, because the `] == [` expression is incorrect. +95 │ # This comment will flag, because the `] == [` expression is incorrect. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 4 levels of indentation. note[CommentWhitespace]: comment not sufficiently indented - ┌─ tests/lints/comment-whitespace/source.wdl:130:13 + ┌─ tests/lints/comment-whitespace/source.wdl:129:13 │ -130 │ # This comment will flag, because the `} == {` expression is incorrect. +129 │ # This comment will flag, because the `} == {` expression is incorrect. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 4 levels of indentation. diff --git a/wdl-lint/tests/lints/comment-whitespace/source.wdl b/wdl-lint/tests/lints/comment-whitespace/source.wdl index 5e05d55a..2380d3f6 100644 --- a/wdl-lint/tests/lints/comment-whitespace/source.wdl +++ b/wdl-lint/tests/lints/comment-whitespace/source.wdl @@ -1,7 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing, DisallowedOutputName, ExpressionSpacing, LineWidth, MissingMetas, NonmatchingOutput, TrailingComma, Whitespace -## some comment - version 1.2 @@ -11,6 +9,7 @@ version 1.2 # another bad comment # a good comment +# a comment with trailing whitespace workflow foo {# test in-line comment without preceding whitespace meta {# this is a problematic yet valid comment diff --git a/wdl-lint/tests/lints/except/source.errors b/wdl-lint/tests/lints/except/source.errors index d64ab702..d523ae68 100644 --- a/wdl-lint/tests/lints/except/source.errors +++ b/wdl-lint/tests/lints/except/source.errors @@ -7,25 +7,25 @@ note[UnknownRule]: unknown lint rule `Unknown` = fix: remove the rule from the exception list note[UnknownRule]: unknown lint rule `AlsoUnknown` - ┌─ tests/lints/except/source.wdl:21:26 + ┌─ tests/lints/except/source.wdl:22:26 │ -21 │ #@ except: SnakeCase,AlsoUnknown +22 │ #@ except: SnakeCase,AlsoUnknown │ ^^^^^^^^^^^ cannot make an exception for this rule │ = fix: remove the rule from the exception list warning[SnakeCase]: struct member name `NotOk` is not snake_case - ┌─ tests/lints/except/source.wdl:23:9 + ┌─ tests/lints/except/source.wdl:24:9 │ -23 │ Int NotOk # NOT OK +24 │ Int NotOk # NOT OK │ ^^^^^ this name must be snake_case │ = fix: replace `NotOk` with `not_ok` warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/except/source.wdl:28:18 + ┌─ tests/lints/except/source.wdl:29:18 │ -28 │ String bad = 'bad string' # NOT OK +29 │ String bad = 'bad string' # NOT OK │ ^^^^^^^^^^^^ │ = fix: change the single quotes to double quotes diff --git a/wdl-lint/tests/lints/missing-comment-space/source.wdl b/wdl-lint/tests/lints/missing-comment-space/source.wdl index 521e41d2..6be12bbb 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.wdl +++ b/wdl-lint/tests/lints/missing-comment-space/source.wdl @@ -1,7 +1,7 @@ #@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing ##This preamble comment is missing a space. -## +## ## But this one isn't and neither are the empty ones ## diff --git a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors index 19b73c83..65cdc7e0 100644 --- a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors @@ -1,11 +1,3 @@ -note[UnknownRule]: unknown lint rule `PreambleWhitespace` - ┌─ tests/lints/one-invalid-preamble-comment/source.wdl:1:59 - │ -1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing, PreambleWhitespace - │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule - │ - = fix: remove the rule from the exception list - note[PreambleFormatting]: preamble comments must start with `##` followed by a space ┌─ tests/lints/one-invalid-preamble-comment/source.wdl:3:1 │ diff --git a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl index 56f63646..62e75989 100644 --- a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl +++ b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, PreambleWhitespace +#@ except: BlankLinesBetweenElements, DescriptionMissing # This is a test of having one big invalid preamble comment. # diff --git a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors index 6ca3a47d..e165cbc9 100644 --- a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors @@ -15,20 +15,3 @@ warning[RuntimeSectionKeys]: the following runtime keys are not reserved in the │ = fix: if reserved key names were intended, correct the spelling of each key; otherwise, remove the `cromwell` and `miniwdl` keys -warning[RuntimeSectionKeys]: the following runtime keys are not reserved in the WDL v1.1 specification: `cromwell` and `miniwdl`; therefore, their inclusion in the `runtime` section is deprecated - ┌─ tests/lints/runtime-keys-engine-keys/source.wdl:27:5 - │ -27 │ ╭ runtime { -28 │ │ container: "ubuntu" -29 │ │ cpu: 1 -30 │ │ disks: [] - · │ -35 │ │ cromwell: {} - │ │ -------- the `cromwell` key should be removed -36 │ │ miniwdl: {} - │ │ ------- the `miniwdl` key should be removed -37 │ │ } - │ ╰─────^ - │ - = fix: if reserved key names were intended, correct the spelling of each key; otherwise, remove the `cromwell` and `miniwdl` keys - diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors b/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors index 2746caee..a73b08b0 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors @@ -6,14 +6,6 @@ note[RuntimeSectionKeys]: the following runtime keys are recommended by the WDL │ = fix: include entries for the `docker` and `memory` keys in the `runtime` section -note[RuntimeSectionKeys]: the following runtime keys are recommended by the WDL v1.0 specification: `docker` and `memory` - ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:18:5 - │ -18 │ runtime {} # Errors should be ignored - │ ^^^^^^^^^^ - │ - = fix: include entries for the `docker` and `memory` keys in the `runtime` section - note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.0 specification: `memory` ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:25:5 │ diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors b/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors index dc12f57e..5a40db35 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors @@ -6,14 +6,6 @@ note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1 │ = fix: include an entry for the `container` key in the `runtime` section -note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.1 specification: `container` - ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:19:5 - │ -19 │ runtime {} # No errors should show. - │ ^^^^^^^^^^ - │ - = fix: include an entry for the `container` key in the `runtime` section - warning[RuntimeSectionKeys]: the following runtime key is not reserved in the WDL v1.1 specification: `foo`; therefore, its inclusion in the `runtime` section is deprecated ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:42:5 │ From e50d47e7f7c3b2d7fa10bc269c77df90af9a60c3 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Wed, 25 Sep 2024 15:36:24 -0400 Subject: [PATCH 15/30] chore: clean up after merge --- wdl-lint/src/rules/preamble_formatting.rs | 2 +- .../between-import-whitespace/source.errors | 2 +- .../blank-lines-between-elements/source.errors | 10 +++++----- .../lints/missing-comment-space/source.errors | 8 ++++++++ .../tests/lints/only-whitespace/source.errors | 18 +++++++++--------- .../trailing-comment-whitespace/source.errors | 10 ++++++++++ 6 files changed, 34 insertions(+), 16 deletions(-) diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs index 3b2de936..bf97b985 100644 --- a/wdl-lint/src/rules/preamble_formatting.rs +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -5,6 +5,7 @@ use wdl_ast::Comment; use wdl_ast::Diagnostic; use wdl_ast::Diagnostics; use wdl_ast::Document; +use wdl_ast::EXCEPT_COMMENT_PREFIX; use wdl_ast::Span; use wdl_ast::SupportedVersion; use wdl_ast::SyntaxKind; @@ -13,7 +14,6 @@ use wdl_ast::VersionStatement; use wdl_ast::VisitReason; use wdl_ast::Visitor; use wdl_ast::Whitespace; -use wdl_ast::EXCEPT_COMMENT_PREFIX; use crate::Rule; use crate::Tag; diff --git a/wdl-lint/tests/lints/between-import-whitespace/source.errors b/wdl-lint/tests/lints/between-import-whitespace/source.errors index 2c7d76df..d8eb55bb 100644 --- a/wdl-lint/tests/lints/between-import-whitespace/source.errors +++ b/wdl-lint/tests/lints/between-import-whitespace/source.errors @@ -42,7 +42,7 @@ note[ImportWhitespace]: blank lines are not allowed between imports │ = fix: remove any blank lines between imports -warning[Whitespace]: more than one blank line in a row +note[Whitespace]: more than one blank line in a row ┌─ tests/lints/between-import-whitespace/source.wdl:20:1 │ 20 │ ╭ diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors index 289d399c..c47c70f0 100755 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors @@ -7,7 +7,7 @@ note[ImportWhitespace]: blank lines are not allowed between imports │ = fix: remove any blank lines between imports -warning[Whitespace]: more than one blank line in a row +note[Whitespace]: more than one blank line in a row ┌─ tests/lints/blank-lines-between-elements/source.wdl:12:1 │ 12 │ ╭ @@ -53,7 +53,7 @@ note[BlankLinesBetweenElements]: missing blank line │ = fix: add a blank line before this element -warning[Whitespace]: more than one blank line in a row +note[Whitespace]: more than one blank line in a row ┌─ tests/lints/blank-lines-between-elements/source.wdl:30:1 │ 30 │ ╭ @@ -62,7 +62,7 @@ warning[Whitespace]: more than one blank line in a row │ = fix: remove the unnecessary blank lines -warning[Whitespace]: more than one blank line in a row +note[Whitespace]: more than one blank line in a row ┌─ tests/lints/blank-lines-between-elements/source.wdl:36:1 │ 36 │ ╭ @@ -71,7 +71,7 @@ warning[Whitespace]: more than one blank line in a row │ = fix: remove the unnecessary blank lines -warning[Whitespace]: more than one blank line in a row +note[Whitespace]: more than one blank line in a row ┌─ tests/lints/blank-lines-between-elements/source.wdl:41:1 │ 41 │ ╭ @@ -149,7 +149,7 @@ note[BlankLinesBetweenElements]: extra blank line(s) found │ = fix: remove the blank line(s) -warning[Whitespace]: more than one blank line in a row +note[Whitespace]: more than one blank line in a row ┌─ tests/lints/blank-lines-between-elements/source.wdl:80:1 │ 80 │ ╭ diff --git a/wdl-lint/tests/lints/missing-comment-space/source.errors b/wdl-lint/tests/lints/missing-comment-space/source.errors index f12d83b8..9daab15c 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.errors +++ b/wdl-lint/tests/lints/missing-comment-space/source.errors @@ -6,3 +6,11 @@ note[PreambleFormatting]: preamble comments must start with `##` followed by a s │ = fix: change each preamble comment to start with `##` followed by a space +note[Whitespace]: line contains trailing whitespace + ┌─ tests/lints/missing-comment-space/source.wdl:4:3 + │ +4 │ ## + │ ^ + │ + = fix: remove this trailing whitespace + diff --git a/wdl-lint/tests/lints/only-whitespace/source.errors b/wdl-lint/tests/lints/only-whitespace/source.errors index 9e0e2f07..d1da8355 100644 --- a/wdl-lint/tests/lints/only-whitespace/source.errors +++ b/wdl-lint/tests/lints/only-whitespace/source.errors @@ -1,4 +1,4 @@ -warning[Whitespace]: line contains only whitespace +note[Whitespace]: line contains only whitespace ┌─ tests/lints/only-whitespace/source.wdl:8:1 │ 8 │ @@ -6,7 +6,7 @@ warning[Whitespace]: line contains only whitespace │ = fix: remove the whitespace from this line -warning[Whitespace]: line contains only whitespace +note[Whitespace]: line contains only whitespace ┌─ tests/lints/only-whitespace/source.wdl:11:1 │ 11 │ @@ -14,7 +14,7 @@ warning[Whitespace]: line contains only whitespace │ = fix: remove the whitespace from this line -warning[Whitespace]: more than one blank line in a row +note[Whitespace]: more than one blank line in a row ┌─ tests/lints/only-whitespace/source.wdl:11:1 │ 11 │ ╭ @@ -25,15 +25,15 @@ warning[Whitespace]: more than one blank line in a row │ = fix: remove the unnecessary blank lines -warning[Whitespace]: line contains trailing whitespace +note[Whitespace]: line contains trailing whitespace ┌─ tests/lints/only-whitespace/source.wdl:14:16 │ 14 │ workflow test { │ ^^^^ │ - = fix: remove the trailing whitespace from this line + = fix: remove this trailing whitespace -warning[Whitespace]: line contains only whitespace +note[Whitespace]: line contains only whitespace ┌─ tests/lints/only-whitespace/source.wdl:15:1 │ 15 │ @@ -41,15 +41,15 @@ warning[Whitespace]: line contains only whitespace │ = fix: remove the whitespace from this line -warning[Whitespace]: line contains trailing whitespace +note[Whitespace]: line contains trailing whitespace ┌─ tests/lints/only-whitespace/source.wdl:19:18 │ 19 │ String x = "" │ ^^^^^^^^^^^ │ - = fix: remove the trailing whitespace from this line + = fix: remove this trailing whitespace -warning[Whitespace]: line contains only whitespace +note[Whitespace]: line contains only whitespace ┌─ tests/lints/only-whitespace/source.wdl:21:1 │ 21 │ diff --git a/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors b/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors index 4b3d2934..de834e1f 100644 --- a/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors +++ b/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors @@ -6,6 +6,16 @@ note[Whitespace]: line contains trailing whitespace │ = fix: remove this trailing whitespace +note[PreambleFormatting]: expected exactly one blank line between lint directives and preamble comments + ┌─ tests/lints/trailing-comment-whitespace/source.wdl:1:58 + │ +1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing + │ ╭─────────────────────────────────────────────────────────^ +2 │ │ ## This is a preamble comment with whitespace trailing + │ ╰^ + │ + = fix: add a blank line between the last lint directive and the first preamble comment + note[Whitespace]: line contains trailing whitespace ┌─ tests/lints/trailing-comment-whitespace/source.wdl:2:55 │ From 2aac227e5e44e1dfd64e3d3faa2f675e8eaa375c Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Fri, 27 Sep 2024 13:02:06 -0400 Subject: [PATCH 16/30] WIP --- Arena.toml | 1198 ++++++++--------- wdl-lint/src/lib.rs | 3 +- wdl-lint/src/rules.rs | 2 + .../src/rules/misplaced_lint_directive.rs | 6 +- wdl-lint/src/rules/preamble_formatting.rs | 11 +- wdl-lint/src/rules/version_formatting.rs | 155 +++ .../lints/comment-whitespace/source.errors | 10 + .../invalid-preamble-comment/source.errors | 4 - .../source.errors | 8 + .../lints/missing-comment-space/source.errors | 2 - .../lints/missing-preamble-ws/source.errors | 8 + .../source.errors | 2 - .../one-line-after-version/source.errors | 8 + .../source.errors | 2 - .../tests/lints/preamble-ws/source.errors | 8 +- .../too-many-pounds-preamble/source.errors | 4 - .../trailing-comment-whitespace/source.errors | 2 - .../unnecessary-preamble-ws/source.errors | 11 + .../lints/ws-after-blank-line/source.errors | 10 + .../lints/ws-before-version/source.errors | 11 + .../lints/ws-preamble-comments/source.errors | 4 - 21 files changed, 838 insertions(+), 631 deletions(-) create mode 100644 wdl-lint/src/rules/version_formatting.rs diff --git a/Arena.toml b/Arena.toml index 3c64d9ad..8540158b 100644 --- a/Arena.toml +++ b/Arena.toml @@ -12,7 +12,7 @@ commit_hash = "c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2" [repositories."stjudecloud/workflows"] identifier = "stjudecloud/workflows" -commit_hash = "129060215443bbd1b67c4d3d149d48acdab90ef2" +commit_hash = "8a709b25b8a0d0b850c4adb1ba915293d9d024d1" filters = ["/template/task-templates.wdl"] [[diagnostics]] @@ -115,6 +115,11 @@ document = "getwilds/ww-fastq-to-cram:/ww-fastq-to-cram.wdl" message = "ww-fastq-to-cram.wdl:18:35: note[CommentWhitespace]: in-line comments should be preceded by two spaces" permalink = "https://github.com/getwilds/ww-fastq-to-cram/blob/2d1e1989a57402642c06d15f4b623ac66fd9ed7d/ww-fastq-to-cram.wdl/#L18" +[[diagnostics]] +document = "getwilds/ww-fastq-to-cram:/ww-fastq-to-cram.wdl" +message = "ww-fastq-to-cram.wdl:1:12: note[VersionFormatting]: expected exactly one blank line after the version statement" +permalink = "https://github.com/getwilds/ww-fastq-to-cram/blob/2d1e1989a57402642c06d15f4b623ac66fd9ed7d/ww-fastq-to-cram.wdl/#L1" + [[diagnostics]] document = "getwilds/ww-fastq-to-cram:/ww-fastq-to-cram.wdl" message = "ww-fastq-to-cram.wdl:200:67: note[BlankLinesBetweenElements]: extra blank line(s) found" @@ -150,11 +155,6 @@ document = "getwilds/ww-fastq-to-cram:/ww-fastq-to-cram.wdl" message = "ww-fastq-to-cram.wdl:23:10: warning[SnakeCase]: workflow name `PairedFastqsToUnmappedCram` is not snake_case" permalink = "https://github.com/getwilds/ww-fastq-to-cram/blob/2d1e1989a57402642c06d15f4b623ac66fd9ed7d/ww-fastq-to-cram.wdl/#L23" -[[diagnostics]] -document = "getwilds/ww-fastq-to-cram:/ww-fastq-to-cram.wdl" -message = "ww-fastq-to-cram.wdl:2:1: note[PreambleWhitespace]: expected a blank line after the version statement" -permalink = "https://github.com/getwilds/ww-fastq-to-cram/blob/2d1e1989a57402642c06d15f4b623ac66fd9ed7d/ww-fastq-to-cram.wdl/#L2" - [[diagnostics]] document = "getwilds/ww-fastq-to-cram:/ww-fastq-to-cram.wdl" message = "ww-fastq-to-cram.wdl:31:36: note[CommentWhitespace]: in-line comments should be preceded by two spaces" @@ -415,6 +415,11 @@ document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" message = "ww-star-deseq2.wdl:196:10: warning[SnakeCase]: output name `SJout` is not snake_case" permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697c3f707f073177ddde7013/ww-star-deseq2.wdl/#L196" +[[diagnostics]] +document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" +message = "ww-star-deseq2.wdl:1:12: note[VersionFormatting]: expected exactly one blank line after the version statement" +permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697c3f707f073177ddde7013/ww-star-deseq2.wdl/#L1" + [[diagnostics]] document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" message = "ww-star-deseq2.wdl:200:13: note[ContainerValue]: container URI uses a mutable tag" @@ -525,11 +530,6 @@ document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" message = "ww-star-deseq2.wdl:29:29: note[CallInputSpacing]: call input not properly spaced" permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697c3f707f073177ddde7013/ww-star-deseq2.wdl/#L29" -[[diagnostics]] -document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" -message = "ww-star-deseq2.wdl:2:1: note[PreambleWhitespace]: expected a blank line after the version statement" -permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697c3f707f073177ddde7013/ww-star-deseq2.wdl/#L2" - [[diagnostics]] document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" message = "ww-star-deseq2.wdl:30:13: note[Whitespace]: line contains trailing whitespace" @@ -925,6 +925,11 @@ document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" message = "ww-vc-trio.wdl:19:10: warning[SnakeCase]: input name `batchFile` is not snake_case" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L19" +[[diagnostics]] +document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" +message = "ww-vc-trio.wdl:1:12: note[VersionFormatting]: expected exactly one blank line after the version statement" +permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L1" + [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" message = "ww-vc-trio.wdl:205:9: note[TrailingComma]: item missing trailing comma" @@ -1135,16 +1140,6 @@ document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" message = "ww-vc-trio.wdl:2:1: note[BlankLinesBetweenElements]: missing blank line" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L2" -[[diagnostics]] -document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:2:1: note[PreambleComments]: preamble comments cannot come after the version statement" -permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L2" - -[[diagnostics]] -document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:2:1: note[PreambleWhitespace]: expected a blank line after the version statement" -permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L2" - [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" message = "ww-vc-trio.wdl:300:10: note[DisallowedInputName]: declaration identifier starts with 'input'" @@ -1738,2889 +1733,2894 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "stjudecloud/workflows:/data_structures/flag_filter.wdl" message = "flag_filter.wdl:119:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/data_structures/flag_filter.wdl/#L119" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/data_structures/flag_filter.wdl/#L119" [[diagnostics]] document = "stjudecloud/workflows:/data_structures/read_group.wdl" message = "read_group.wdl:107:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/data_structures/read_group.wdl/#L107" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/data_structures/read_group.wdl/#L107" [[diagnostics]] document = "stjudecloud/workflows:/data_structures/read_group.wdl" message = "read_group.wdl:159:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/data_structures/read_group.wdl/#L159" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/data_structures/read_group.wdl/#L159" [[diagnostics]] document = "stjudecloud/workflows:/data_structures/read_group.wdl" message = "read_group.wdl:192:47: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/data_structures/read_group.wdl/#L192" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/data_structures/read_group.wdl/#L192" [[diagnostics]] document = "stjudecloud/workflows:/data_structures/read_group.wdl" message = "read_group.wdl:444:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/data_structures/read_group.wdl/#L444" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/data_structures/read_group.wdl/#L444" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:102:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L102" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L102" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:11:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L11" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L11" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:142:79: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L142" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L142" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:22:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L22" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L22" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:245:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L245" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L245" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:26:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L26" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L26" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:298:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L298" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L298" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:308:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L308" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L308" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:30:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L30" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L30" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:347:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L347" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L347" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:34:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L34" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L34" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:38:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L38" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L38" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:397:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L397" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L397" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:44:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L44" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L44" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:80:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L80" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L80" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:87:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L87" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L87" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:93:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L93" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L93" [[diagnostics]] document = "stjudecloud/workflows:/tools/arriba.wdl" message = "arriba.wdl:97:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/arriba.wdl/#L97" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/arriba.wdl/#L97" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:105:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L105" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L105" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:109:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L109" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L109" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:115:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L115" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L115" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:119:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L119" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L119" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:123:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L123" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L123" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:171:46: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L171" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L171" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:171:57: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L171" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L171" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:190:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L190" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L190" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:19:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L19" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L19" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:210:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L210" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L210" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:214:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L214" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L214" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:218:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L218" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L218" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:23:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L23" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L23" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:264:55: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L264" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L264" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:264:73: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L264" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L264" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:268:46: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L268" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L268" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:268:57: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L268" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L268" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:27:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L27" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L27" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:286:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L286" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L286" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:303:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L303" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L303" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:337:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L337" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L337" [[diagnostics]] document = "stjudecloud/workflows:/tools/bwa.wdl" message = "bwa.wdl:89:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/bwa.wdl/#L89" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/bwa.wdl/#L89" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:113:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L113" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L113" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:154:23: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L154" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L154" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:154:41: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L154" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L154" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:155:25: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L155" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L155" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:155:30: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L155" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L155" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:155:48: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L155" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L155" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:156:25: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L156" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L156" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:156:30: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L156" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L156" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:156:43: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L156" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L156" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:157:25: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L157" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L157" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:184:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L184" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L184" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:43:16: note[DisallowedInputName]: declaration identifier must be at least 3 characters" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L43" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L43" + +[[diagnostics]] +document = "stjudecloud/workflows:/tools/cellranger.wdl" +message = "cellranger.wdl:5:1: note[PreambleFormatting]: lint directives must come before preamble comments" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L5" [[diagnostics]] document = "stjudecloud/workflows:/tools/cellranger.wdl" message = "cellranger.wdl:95:14: note[DisallowedOutputName]: declaration identifier must be at least 3 characters" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/cellranger.wdl/#L95" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/cellranger.wdl/#L95" [[diagnostics]] document = "stjudecloud/workflows:/tools/deeptools.wdl" message = "deeptools.wdl:19:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/deeptools.wdl/#L19" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/deeptools.wdl/#L19" [[diagnostics]] document = "stjudecloud/workflows:/tools/deeptools.wdl" message = "deeptools.wdl:23:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/deeptools.wdl/#L23" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/deeptools.wdl/#L23" [[diagnostics]] document = "stjudecloud/workflows:/tools/deeptools.wdl" message = "deeptools.wdl:70:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/deeptools.wdl/#L70" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/deeptools.wdl/#L70" [[diagnostics]] document = "stjudecloud/workflows:/tools/estimate.wdl" message = "estimate.wdl:39:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/estimate.wdl/#L39" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/estimate.wdl/#L39" [[diagnostics]] document = "stjudecloud/workflows:/tools/estimate.wdl" message = "estimate.wdl:53:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/estimate.wdl/#L53" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/estimate.wdl/#L53" [[diagnostics]] document = "stjudecloud/workflows:/tools/fastqc.wdl" message = "fastqc.wdl:10:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fastqc.wdl/#L10" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fastqc.wdl/#L10" [[diagnostics]] document = "stjudecloud/workflows:/tools/fastqc.wdl" message = "fastqc.wdl:19:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fastqc.wdl/#L19" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fastqc.wdl/#L19" [[diagnostics]] document = "stjudecloud/workflows:/tools/fastqc.wdl" message = "fastqc.wdl:23:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fastqc.wdl/#L23" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fastqc.wdl/#L23" [[diagnostics]] document = "stjudecloud/workflows:/tools/fastqc.wdl" message = "fastqc.wdl:67:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fastqc.wdl/#L67" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fastqc.wdl/#L67" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:106:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L106" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L106" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:116:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L116" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L116" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:120:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L120" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L120" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:143:30: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L143" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L143" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:145:9: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L145" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L145" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:156:15: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L156" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L156" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:158:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L158" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L158" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:16:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L16" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L16" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:172:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L172" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L172" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:20:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L20" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L20" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:24:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L24" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L24" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:32:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L32" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L32" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:37:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L37" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L37" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:40:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L40" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L40" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:45:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L45" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L45" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:48:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L48" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L48" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:53:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L53" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L53" [[diagnostics]] document = "stjudecloud/workflows:/tools/fq.wdl" message = "fq.wdl:96:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/fq.wdl/#L96" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/fq.wdl/#L96" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:12:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L12" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L12" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:152:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L152" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L152" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:163:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L163" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L163" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:164:10: note[BlankLinesBetweenElements]: extra blank line(s) found" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L164" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L164" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:216:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L216" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L216" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:227:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L227" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L227" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:236:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L236" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L236" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:246:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L246" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L246" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:302:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L302" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L302" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:313:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L313" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L313" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:326:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L326" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L326" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:330:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L330" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L330" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:375:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L375" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L375" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:387:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L387" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L387" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:399:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L399" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L399" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:402:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L402" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L402" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:411:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L411" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L411" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:419:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L419" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L419" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:425:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L425" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L425" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:488:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L488" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L488" [[diagnostics]] document = "stjudecloud/workflows:/tools/gatk4.wdl" message = "gatk4.wdl:71:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/gatk4.wdl/#L71" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/gatk4.wdl/#L71" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:135:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L135" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L135" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:19:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L19" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L19" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:206:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L206" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L206" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:22:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L22" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L22" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:28:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L28" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L28" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:32:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L32" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L32" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:37:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L37" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L37" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:40:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L40" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L40" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:45:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L45" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L45" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:49:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L49" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L49" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:53:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L53" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L53" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:57:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L57" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L57" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:61:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L61" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L61" [[diagnostics]] document = "stjudecloud/workflows:/tools/htseq.wdl" message = "htseq.wdl:65:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/htseq.wdl/#L65" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/htseq.wdl/#L65" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:118:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L118" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L118" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:175:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L175" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L175" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:192:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L192" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L192" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:197:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L197" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L197" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:205:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L205" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L205" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:259:15: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L259" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L259" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:261:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L261" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L261" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:284:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L284" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L284" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:295:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L295" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L295" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:297:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L297" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L297" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:299:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L299" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L299" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:311:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L311" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L311" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:316:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L316" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L316" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:321:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L321" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L321" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:330:14: note[DisallowedInputName]: declaration identifier must be at least 3 characters" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L330" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L330" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:351:24: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L351" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L351" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:353:9: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L353" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L353" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:398:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L398" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L398" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:44:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L44" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L44" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:60:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L60" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L60" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:72:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L72" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L72" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:85:32: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L85" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L85" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:85:45: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L85" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L85" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:89:28: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L89" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L89" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:89:41: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L89" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L89" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:90:18: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L90" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L90" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:90:33: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L90" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L90" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:90:40: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L90" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L90" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:91:13: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L91" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L91" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:91:18: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L91" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L91" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:91:33: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L91" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L91" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:91:40: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L91" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L91" [[diagnostics]] document = "stjudecloud/workflows:/tools/kraken2.wdl" message = "kraken2.wdl:92:13: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/kraken2.wdl/#L92" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/kraken2.wdl/#L92" [[diagnostics]] document = "stjudecloud/workflows:/tools/librarian.wdl" message = "librarian.wdl:20:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/librarian.wdl/#L20" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/librarian.wdl/#L20" [[diagnostics]] document = "stjudecloud/workflows:/tools/librarian.wdl" message = "librarian.wdl:52:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/librarian.wdl/#L52" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/librarian.wdl/#L52" [[diagnostics]] document = "stjudecloud/workflows:/tools/md5sum.wdl" message = "md5sum.wdl:39:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/md5sum.wdl/#L39" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/md5sum.wdl/#L39" [[diagnostics]] document = "stjudecloud/workflows:/tools/mosdepth.wdl" message = "mosdepth.wdl:11:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/mosdepth.wdl/#L11" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/mosdepth.wdl/#L11" [[diagnostics]] document = "stjudecloud/workflows:/tools/mosdepth.wdl" message = "mosdepth.wdl:23:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/mosdepth.wdl/#L23" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/mosdepth.wdl/#L23" [[diagnostics]] document = "stjudecloud/workflows:/tools/mosdepth.wdl" message = "mosdepth.wdl:69:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/mosdepth.wdl/#L69" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/mosdepth.wdl/#L69" [[diagnostics]] document = "stjudecloud/workflows:/tools/multiqc.wdl" message = "multiqc.wdl:21:21: note[DisallowedInputName]: declaration identifier starts with 'input'" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/multiqc.wdl/#L21" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/multiqc.wdl/#L21" [[diagnostics]] document = "stjudecloud/workflows:/tools/multiqc.wdl" message = "multiqc.wdl:68:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/multiqc.wdl/#L68" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/multiqc.wdl/#L68" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:106:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L106" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L106" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:140:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L140" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L140" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:159:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L159" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L159" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:163:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L163" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L163" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:204:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L204" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L204" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:21:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L21" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L21" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:223:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L223" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L223" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:25:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L25" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L25" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:281:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L281" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L281" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:29:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L29" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L29" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:303:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L303" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L303" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:307:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L307" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L307" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:311:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L311" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L311" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:315:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L315" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L315" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:33:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L33" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L33" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:369:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L369" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L369" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:387:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L387" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L387" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:391:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L391" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L391" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:395:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L395" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L395" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:399:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L399" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L399" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:403:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L403" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L403" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:407:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L407" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L407" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:427:21: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L427" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L427" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:427:33: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L427" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L427" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:429:7: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L429" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L429" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:429:7: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L429" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L429" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:451:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L451" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L451" [[diagnostics]] document = "stjudecloud/workflows:/tools/ngsderive.wdl" message = "ngsderive.wdl:87:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/ngsderive.wdl/#L87" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/ngsderive.wdl/#L87" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:1037:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L1037" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L1037" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:125:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L125" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L125" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:145:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L145" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L145" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:14:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L14" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L14" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:153:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L153" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L153" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:159:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L159" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L159" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:163:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L163" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L163" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:167:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L167" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L167" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:190:28: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L190" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L190" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:192:9: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L192" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L192" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:194:29: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L194" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L194" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:196:9: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L196" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L196" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:247:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L247" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L247" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:259:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L259" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L259" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:26:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L26" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L26" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:270:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L270" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L270" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:272:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L272" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L272" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:280:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L280" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L280" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:29:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L29" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L29" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:330:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L330" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L330" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:342:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L342" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L342" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:355:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L355" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L355" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:357:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L357" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L357" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:364:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L364" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L364" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:38:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L38" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L38" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:417:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L417" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L417" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:429:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L429" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L429" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:441:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L441" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L441" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:46:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L46" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L46" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:485:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L485" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L485" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:497:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L497" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L497" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:511:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L511" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L511" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:52:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L52" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L52" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:548:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L548" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L548" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:560:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L560" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L560" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:562:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L562" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L562" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:574:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L574" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L574" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:610:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L610" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L610" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:622:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L622" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L622" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:626:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L626" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L626" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:628:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L628" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L628" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:641:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L641" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L641" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:681:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L681" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L681" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:693:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L693" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L693" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:695:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L695" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L695" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:707:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L707" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L707" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:743:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L743" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L743" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:754:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L754" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L754" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:766:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L766" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L766" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:802:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L802" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L802" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:819:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L819" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L819" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:842:49: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L842" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L842" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:842:56: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L842" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L842" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:847:36: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L847" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L847" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:858:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L858" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L858" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:869:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L869" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L869" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:897:14: note[DisallowedOutputName]: declaration identifier starts with 'output'" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L897" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L897" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:898:14: note[DisallowedOutputName]: declaration identifier starts with 'output'" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L898" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L898" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:904:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L904" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L904" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:915:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L915" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L915" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:923:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L923" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L923" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:926:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L926" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L926" [[diagnostics]] document = "stjudecloud/workflows:/tools/picard.wdl" message = "picard.wdl:976:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/picard.wdl/#L976" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/picard.wdl/#L976" [[diagnostics]] document = "stjudecloud/workflows:/tools/qualimap.wdl" message = "qualimap.wdl:11:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/qualimap.wdl/#L11" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/qualimap.wdl/#L11" [[diagnostics]] document = "stjudecloud/workflows:/tools/qualimap.wdl" message = "qualimap.wdl:157:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/qualimap.wdl/#L157" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/qualimap.wdl/#L157" [[diagnostics]] document = "stjudecloud/workflows:/tools/qualimap.wdl" message = "qualimap.wdl:22:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/qualimap.wdl/#L22" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/qualimap.wdl/#L22" [[diagnostics]] document = "stjudecloud/workflows:/tools/qualimap.wdl" message = "qualimap.wdl:26:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/qualimap.wdl/#L26" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/qualimap.wdl/#L26" [[diagnostics]] document = "stjudecloud/workflows:/tools/qualimap.wdl" message = "qualimap.wdl:89:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/qualimap.wdl/#L89" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/qualimap.wdl/#L89" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:117:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L117" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L117" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:135:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L135" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L135" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:172:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L172" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L172" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:17:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L17" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L17" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:183:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L183" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L183" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:192:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L192" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L192" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:21:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L21" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L21" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:228:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L228" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L228" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:246:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L246" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L246" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:250:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L250" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L250" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:285:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L285" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L285" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:57:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L57" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L57" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:75:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L75" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L75" [[diagnostics]] document = "stjudecloud/workflows:/tools/sambamba.wdl" message = "sambamba.wdl:79:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/sambamba.wdl/#L79" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/sambamba.wdl/#L79" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1003:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1003" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1003" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1054:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1054" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1054" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1158:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1158" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1158" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1176:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1176" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1176" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1188:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1188" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1188" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1202:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1202" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1202" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1208:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1208" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1208" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1278:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1278" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1278" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:1324:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L1324" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L1324" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:153:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L153" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L153" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:171:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L171" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L171" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:175:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L175" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L175" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:211:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L211" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L211" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:228:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L228" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L228" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:232:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L232" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L232" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:270:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L270" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L270" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:281:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L281" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L281" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:291:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L291" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L291" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:295:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L295" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L295" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:39:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L39" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L39" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:416:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L416" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L416" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:436:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L436" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L436" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:440:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L440" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L440" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:503:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L503" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L503" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:523:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L523" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L523" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:527:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L527" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L527" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:531:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L531" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L531" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:535:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L535" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L535" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:539:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L539" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L539" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:543:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L543" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L543" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:55:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L55" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L55" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:605:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L605" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L605" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:60:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L60" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L60" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:623:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L623" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L623" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:628:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L628" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L628" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:632:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L632" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L632" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:636:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L636" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L636" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:640:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L640" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L640" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:64:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L64" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L64" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:68:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L68" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L68" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:690:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L690" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L690" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:708:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L708" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L708" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:712:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L712" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L712" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:716:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L716" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L716" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:72:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L72" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L72" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:763:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L763" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L763" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:788:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L788" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L788" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:792:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L792" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L792" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:796:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L796" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L796" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:800:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L800" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L800" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:804:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L804" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L804" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:808:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L808" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L808" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:814:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L814" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L814" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:818:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L818" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L818" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:822:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L822" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L822" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:894:15: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L894" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L894" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:896:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L896" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L896" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:899:17: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L899" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L899" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:899:31: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L899" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L899" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:902:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L902" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L902" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:905:17: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L905" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L905" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:905:31: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L905" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L905" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:908:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L908" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L908" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:911:17: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L911" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L911" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:911:31: note[ExpressionSpacing]: multi-line if...then...else must have a preceding space" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L911" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L911" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:913:40: note[ExpressionSpacing]: operators must be surrounded by whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L913" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L913" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:916:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L916" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L916" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:919:17: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L919" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L919" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:921:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L921" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L921" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:956:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L956" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L956" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:973:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L973" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L973" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:980:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L980" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L980" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:982:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L982" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L982" [[diagnostics]] document = "stjudecloud/workflows:/tools/samtools.wdl" message = "samtools.wdl:999:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/samtools.wdl/#L999" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/samtools.wdl/#L999" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:130:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L130" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L130" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:154:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L154" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L154" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:167:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L167" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L167" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:169:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L169" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L169" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:174:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L174" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L174" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:176:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L176" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L176" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:185:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L185" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L185" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:188:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L188" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L188" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:18:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L18" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L18" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:195:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L195" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L195" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:197:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L197" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L197" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:213:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L213" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L213" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:215:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L215" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L215" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:219:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L219" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L219" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:221:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L221" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L221" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:226:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L226" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L226" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:228:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L228" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L228" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:22:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L22" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L22" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:233:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L233" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L233" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:235:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L235" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L235" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:240:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L240" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L240" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:242:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L242" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L242" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:249:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L249" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L249" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:251:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L251" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L251" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:258:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L258" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L258" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:260:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L260" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L260" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:266:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L266" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L266" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:268:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L268" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L268" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:274:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L274" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L274" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:276:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L276" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L276" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:280:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L280" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L280" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:284:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L284" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L284" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:291:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L291" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L291" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:293:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L293" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L293" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:299:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L299" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L299" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:301:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L301" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L301" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:308:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L308" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L308" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:311:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L311" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L311" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:315:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L315" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L315" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:317:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L317" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L317" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:31:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L31" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L31" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:324:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L324" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L324" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:326:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L326" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L326" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:332:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L332" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L332" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:334:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L334" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L334" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:338:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L338" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L338" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:350:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L350" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L350" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:354:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L354" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L354" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:358:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L358" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L358" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:372:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L372" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L372" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:376:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L376" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L376" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:380:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L380" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L380" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:384:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L384" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L384" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:39:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L39" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L39" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:405:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L405" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L405" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:409:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L409" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L409" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:413:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L413" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L413" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:417:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L417" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L417" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:421:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L421" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L421" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:435:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L435" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L435" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:439:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L439" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L439" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:43:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L43" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L43" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:443:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L443" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L443" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:449:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L449" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L449" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:453:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L453" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L453" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:457:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L457" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L457" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:461:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L461" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L461" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:467:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L467" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L467" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:471:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L471" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L471" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:487:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L487" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L487" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:493:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L493" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L493" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:499:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L499" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L499" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:505:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L505" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L505" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:511:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L511" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L511" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:654:17: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L654" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L654" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:656:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L656" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L656" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:678:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L678" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L678" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:684:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L684" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L684" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:690:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L690" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L690" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:696:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L696" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L696" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:702:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L702" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L702" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:726:17: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L726" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L726" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:728:17: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L728" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L728" [[diagnostics]] document = "stjudecloud/workflows:/tools/star.wdl" message = "star.wdl:823:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/star.wdl/#L823" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/star.wdl/#L823" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:101:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L101" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L101" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:120:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L120" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L120" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:125:16: note[DisallowedInputName]: declaration identifier starts with 'input'" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L125" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L125" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:142:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L142" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L142" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:161:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L161" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L161" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:242:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L242" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L242" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:279:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L279" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L279" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:324:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L324" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L324" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:366:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L366" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L366" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:384:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L384" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L384" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:392:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L392" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L392" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:425:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L425" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L425" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:45:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L45" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L45" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:61:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L61" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L61" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:65:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L65" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L65" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:686:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L686" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L686" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:764:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L764" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L764" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:780:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L780" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L780" [[diagnostics]] document = "stjudecloud/workflows:/tools/util.wdl" message = "util.wdl:825:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/tools/util.wdl/#L825" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/tools/util.wdl/#L825" [[diagnostics]] document = "stjudecloud/workflows:/workflows/chipseq/chipseq-standard.wdl" message = "chipseq-standard.wdl:10:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/chipseq/chipseq-standard.wdl/#L10" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/chipseq/chipseq-standard.wdl/#L10" [[diagnostics]] document = "stjudecloud/workflows:/workflows/chipseq/chipseq-standard.wdl" message = "chipseq-standard.wdl:11:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/chipseq/chipseq-standard.wdl/#L11" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/chipseq/chipseq-standard.wdl/#L11" [[diagnostics]] document = "stjudecloud/workflows:/workflows/chipseq/chipseq-standard.wdl" message = "chipseq-standard.wdl:124:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/chipseq/chipseq-standard.wdl/#L124" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/chipseq/chipseq-standard.wdl/#L124" [[diagnostics]] document = "stjudecloud/workflows:/workflows/chipseq/chipseq-standard.wdl" message = "chipseq-standard.wdl:12:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/chipseq/chipseq-standard.wdl/#L12" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/chipseq/chipseq-standard.wdl/#L12" [[diagnostics]] document = "stjudecloud/workflows:/workflows/chipseq/chipseq-standard.wdl" message = "chipseq-standard.wdl:21:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/chipseq/chipseq-standard.wdl/#L21" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/chipseq/chipseq-standard.wdl/#L21" [[diagnostics]] document = "stjudecloud/workflows:/workflows/chipseq/chipseq-standard.wdl" message = "chipseq-standard.wdl:89:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/chipseq/chipseq-standard.wdl/#L89" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/chipseq/chipseq-standard.wdl/#L89" [[diagnostics]] document = "stjudecloud/workflows:/workflows/chipseq/chipseq-standard.wdl" message = "chipseq-standard.wdl:95:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/chipseq/chipseq-standard.wdl/#L95" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/chipseq/chipseq-standard.wdl/#L95" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-core.wdl" message = "dnaseq-core.wdl:18:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-core.wdl/#L18" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-core.wdl/#L18" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-core.wdl" message = "dnaseq-core.wdl:22:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-core.wdl/#L22" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-core.wdl/#L22" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-core.wdl" message = "dnaseq-core.wdl:31:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-core.wdl/#L31" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-core.wdl/#L31" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-core.wdl" message = "dnaseq-core.wdl:31:22: note[KeyValuePairs]: all items in an array or object should be on separate lines" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-core.wdl/#L31" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-core.wdl/#L31" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-core.wdl" message = "dnaseq-core.wdl:36:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-core.wdl/#L36" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-core.wdl/#L36" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-core.wdl" message = "dnaseq-core.wdl:68:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-core.wdl/#L68" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-core.wdl/#L68" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-core.wdl" message = "dnaseq-core.wdl:80:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-core.wdl/#L80" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-core.wdl/#L80" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-core.wdl" message = "dnaseq-core.wdl:85:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-core.wdl/#L85" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-core.wdl/#L85" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:116:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L116" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L116" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:116:22: note[KeyValuePairs]: all items in an array or object should be on separate lines" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L116" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L116" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:14:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L14" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L14" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:151:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L151" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L151" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:18:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L18" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L18" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:30:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L30" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L30" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:30:22: note[KeyValuePairs]: all items in an array or object should be on separate lines" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L30" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L30" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:36:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L36" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L36" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:51:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L51" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L51" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:54:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L54" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L54" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:79:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L79" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L79" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:84:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L84" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L84" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard-fastq.wdl" message = "dnaseq-standard-fastq.wdl:96:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L96" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard-fastq.wdl/#L96" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard.wdl" message = "dnaseq-standard.wdl:104:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard.wdl/#L104" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard.wdl/#L104" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard.wdl" message = "dnaseq-standard.wdl:104:22: note[KeyValuePairs]: all items in an array or object should be on separate lines" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard.wdl/#L104" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard.wdl/#L104" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard.wdl" message = "dnaseq-standard.wdl:129:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard.wdl/#L129" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard.wdl/#L129" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard.wdl" message = "dnaseq-standard.wdl:16:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard.wdl/#L16" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard.wdl/#L16" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard.wdl" message = "dnaseq-standard.wdl:20:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard.wdl/#L20" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard.wdl/#L20" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard.wdl" message = "dnaseq-standard.wdl:27:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard.wdl/#L27" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard.wdl/#L27" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard.wdl" message = "dnaseq-standard.wdl:27:22: note[KeyValuePairs]: all items in an array or object should be on separate lines" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard.wdl/#L27" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard.wdl/#L27" [[diagnostics]] document = "stjudecloud/workflows:/workflows/dnaseq/dnaseq-standard.wdl" message = "dnaseq-standard.wdl:34:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/dnaseq/dnaseq-standard.wdl/#L34" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/dnaseq/dnaseq-standard.wdl/#L34" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/alignment-post.wdl" message = "alignment-post.wdl:15:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/alignment-post.wdl/#L15" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/alignment-post.wdl/#L15" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/alignment-post.wdl" message = "alignment-post.wdl:26:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/alignment-post.wdl/#L26" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/alignment-post.wdl/#L26" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/alignment-post.wdl" message = "alignment-post.wdl:29:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/alignment-post.wdl/#L29" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/alignment-post.wdl/#L29" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/alignment-post.wdl" message = "alignment-post.wdl:58:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/alignment-post.wdl/#L58" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/alignment-post.wdl/#L58" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/alignment-post.wdl" message = "alignment-post.wdl:6:1: note[LineWidth]: line exceeds maximum width of 90" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/alignment-post.wdl/#L6" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/alignment-post.wdl/#L6" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/alignment-post.wdl" message = "alignment-post.wdl:70:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/alignment-post.wdl/#L70" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/alignment-post.wdl/#L70" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/bam-to-fastqs.wdl" message = "bam-to-fastqs.wdl:11:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/bam-to-fastqs.wdl/#L11" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/bam-to-fastqs.wdl/#L11" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/samtools-merge.wdl" message = "samtools-merge.wdl:15:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/samtools-merge.wdl/#L15" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/samtools-merge.wdl/#L15" [[diagnostics]] document = "stjudecloud/workflows:/workflows/general/samtools-merge.wdl" message = "samtools-merge.wdl:21:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/general/samtools-merge.wdl/#L21" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/general/samtools-merge.wdl/#L21" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/markdups-post.wdl" message = "markdups-post.wdl:25:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/markdups-post.wdl/#L25" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/markdups-post.wdl/#L25" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:181:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L181" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L181" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:185:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L185" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L185" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:187:36: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L187" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L187" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:189:9: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L189" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L189" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:34:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L34" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L34" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:39:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L39" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L39" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:451:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L451" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L451" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:463:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L463" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L463" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:467:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L467" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L467" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:47:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L47" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L47" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:556:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L556" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L556" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:57:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L57" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L57" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:67:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L67" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L67" [[diagnostics]] document = "stjudecloud/workflows:/workflows/qc/quality-check-standard.wdl" message = "quality-check-standard.wdl:74:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/qc/quality-check-standard.wdl/#L74" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/qc/quality-check-standard.wdl/#L74" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/bwa-db-build.wdl" message = "bwa-db-build.wdl:11:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/bwa-db-build.wdl/#L11" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/bwa-db-build.wdl/#L11" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/gatk-reference.wdl" message = "gatk-reference.wdl:17:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/gatk-reference.wdl/#L17" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/gatk-reference.wdl/#L17" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/gatk-reference.wdl" message = "gatk-reference.wdl:57:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/gatk-reference.wdl/#L57" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/gatk-reference.wdl/#L57" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/gatk-reference.wdl" message = "gatk-reference.wdl:70:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/gatk-reference.wdl/#L70" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/gatk-reference.wdl/#L70" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/gatk-reference.wdl" message = "gatk-reference.wdl:76:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/gatk-reference.wdl/#L76" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/gatk-reference.wdl/#L76" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/gatk-reference.wdl" message = "gatk-reference.wdl:83:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/gatk-reference.wdl/#L83" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/gatk-reference.wdl/#L83" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/gatk-reference.wdl" message = "gatk-reference.wdl:90:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/gatk-reference.wdl/#L90" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/gatk-reference.wdl/#L90" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/make-qc-reference.wdl" message = "make-qc-reference.wdl:137:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/make-qc-reference.wdl/#L137" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/make-qc-reference.wdl/#L137" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/make-qc-reference.wdl" message = "make-qc-reference.wdl:23:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/make-qc-reference.wdl/#L23" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/make-qc-reference.wdl/#L23" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/make-qc-reference.wdl" message = "make-qc-reference.wdl:34:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/make-qc-reference.wdl/#L34" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/make-qc-reference.wdl/#L34" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/make-qc-reference.wdl" message = "make-qc-reference.wdl:40:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/make-qc-reference.wdl/#L40" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/make-qc-reference.wdl/#L40" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/make-qc-reference.wdl" message = "make-qc-reference.wdl:48:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/make-qc-reference.wdl/#L48" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/make-qc-reference.wdl/#L48" [[diagnostics]] document = "stjudecloud/workflows:/workflows/reference/star-db-build.wdl" message = "star-db-build.wdl:12:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/reference/star-db-build.wdl/#L12" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/reference/star-db-build.wdl/#L12" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/ESTIMATE.wdl" message = "ESTIMATE.wdl:12:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/ESTIMATE.wdl/#L12" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/ESTIMATE.wdl/#L12" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:105:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L105" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L105" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:111:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L111" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L111" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:127:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L127" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L127" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:151:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L151" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L151" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:196:33: note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L196" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L196" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:198:9: note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L198" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L198" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:20:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L20" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L20" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:36:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L36" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L36" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:40:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L40" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L40" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:45:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L45" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L45" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:48:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L48" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L48" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:53:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L53" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L53" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:57:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L57" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L57" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:66:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L66" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L66" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:72:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L72" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L72" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:77:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L77" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L77" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:82:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L82" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L82" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:87:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L87" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L87" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:93:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L93" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L93" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-core.wdl" message = "rnaseq-core.wdl:99:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-core.wdl/#L99" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-core.wdl/#L99" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:112:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L112" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L112" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:143:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L143" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L143" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:148:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L148" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L148" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:36:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L36" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L36" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:49:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L49" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L49" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:63:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L63" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L63" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:70:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L70" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L70" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:73:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L73" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L73" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:78:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L78" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L78" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard-fastq.wdl" message = "rnaseq-standard-fastq.wdl:82:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L82" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard-fastq.wdl/#L82" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:141:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L141" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L141" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:145:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L145" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L145" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:153:16: note[DisallowedInputName]: declaration identifier starts with 'input'" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L153" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L153" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:182:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L182" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L182" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:20:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L20" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L20" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:33:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L33" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L33" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:36:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L36" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L36" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:41:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L41" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L41" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:45:17: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L45" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L45" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-standard.wdl" message = "rnaseq-standard.wdl:73:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-standard.wdl/#L73" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-standard.wdl/#L73" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:100:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L100" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L100" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:107:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L107" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L107" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:116:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L116" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L116" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:13:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L13" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L13" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:51:9: note[ExpressionSpacing]: prefix operators may not contain whitespace" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L51" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L51" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:54:13: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L54" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L54" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:64:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L64" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L64" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:76:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L76" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L76" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:83:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L83" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L83" [[diagnostics]] document = "stjudecloud/workflows:/workflows/rnaseq/rnaseq-variant-calling.wdl" message = "rnaseq-variant-calling.wdl:88:9: note[TrailingComma]: item missing trailing comma" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/rnaseq/rnaseq-variant-calling.wdl/#L88" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/rnaseq/rnaseq-variant-calling.wdl/#L88" [[diagnostics]] document = "stjudecloud/workflows:/workflows/scrnaseq/10x-bam-to-fastqs.wdl" message = "10x-bam-to-fastqs.wdl:18:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/scrnaseq/10x-bam-to-fastqs.wdl/#L18" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/scrnaseq/10x-bam-to-fastqs.wdl/#L18" [[diagnostics]] document = "stjudecloud/workflows:/workflows/scrnaseq/10x-bam-to-fastqs.wdl" message = "10x-bam-to-fastqs.wdl:64:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/scrnaseq/10x-bam-to-fastqs.wdl/#L64" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/scrnaseq/10x-bam-to-fastqs.wdl/#L64" [[diagnostics]] document = "stjudecloud/workflows:/workflows/scrnaseq/10x-bam-to-fastqs.wdl" message = "10x-bam-to-fastqs.wdl:69:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/scrnaseq/10x-bam-to-fastqs.wdl/#L69" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/scrnaseq/10x-bam-to-fastqs.wdl/#L69" [[diagnostics]] document = "stjudecloud/workflows:/workflows/scrnaseq/10x-bam-to-fastqs.wdl" message = "10x-bam-to-fastqs.wdl:93:20: note[ContainerValue]: container URI uses a mutable tag" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/scrnaseq/10x-bam-to-fastqs.wdl/#L93" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/scrnaseq/10x-bam-to-fastqs.wdl/#L93" [[diagnostics]] document = "stjudecloud/workflows:/workflows/scrnaseq/scrnaseq-standard.wdl" message = "scrnaseq-standard.wdl:32:5: note[BlankLinesBetweenElements]: missing blank line" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/scrnaseq/scrnaseq-standard.wdl/#L32" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/scrnaseq/scrnaseq-standard.wdl/#L32" [[diagnostics]] document = "stjudecloud/workflows:/workflows/scrnaseq/scrnaseq-standard.wdl" message = "scrnaseq-standard.wdl:91:14: note[DisallowedOutputName]: declaration identifier must be at least 3 characters" -permalink = "https://github.com/stjudecloud/workflows/blob/129060215443bbd1b67c4d3d149d48acdab90ef2/workflows/scrnaseq/scrnaseq-standard.wdl/#L91" +permalink = "https://github.com/stjudecloud/workflows/blob/8a709b25b8a0d0b850c4adb1ba915293d9d024d1/workflows/scrnaseq/scrnaseq-standard.wdl/#L91" diff --git a/wdl-lint/src/lib.rs b/wdl-lint/src/lib.rs index 01f6dd0f..f2c236d7 100644 --- a/wdl-lint/src/lib.rs +++ b/wdl-lint/src/lib.rs @@ -111,7 +111,8 @@ pub fn rules() -> Vec> { Box::::default(), Box::::default(), Box::::default(), - Box::::default(), + Box::::default(), + Box::::default(), ]; // Ensure all the rule ids are unique and pascal case diff --git a/wdl-lint/src/rules.rs b/wdl-lint/src/rules.rs index 9388e74d..a0193228 100644 --- a/wdl-lint/src/rules.rs +++ b/wdl-lint/src/rules.rs @@ -36,6 +36,7 @@ mod snake_case; mod todo; mod trailing_comma; mod unknown_rule; +mod version_formatting; mod whitespace; pub use blank_lines_between_elements::*; @@ -74,4 +75,5 @@ pub use snake_case::*; pub use todo::*; pub use trailing_comma::*; pub use unknown_rule::*; +pub use version_formatting::*; pub use whitespace::*; diff --git a/wdl-lint/src/rules/misplaced_lint_directive.rs b/wdl-lint/src/rules/misplaced_lint_directive.rs index 699d75a4..750ce1ff 100644 --- a/wdl-lint/src/rules/misplaced_lint_directive.rs +++ b/wdl-lint/src/rules/misplaced_lint_directive.rs @@ -65,9 +65,9 @@ pub static RULE_MAP: LazyLock &'static str { ID } @@ -91,7 +91,7 @@ impl Rule for MisplacedLintDirective { } } -impl Visitor for MisplacedLintDirective { +impl Visitor for MisplacedLintDirectiveRule { type State = Diagnostics; fn document(&mut self, _: &mut Self::State, _: VisitReason, _: &Document, _: SupportedVersion) { diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs index bf97b985..23adace9 100644 --- a/wdl-lint/src/rules/preamble_formatting.rs +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -27,7 +27,6 @@ fn invalid_preamble_comment(span: Span) -> Diagnostic { Diagnostic::note("preamble comments must start with `##` followed by a space") .with_rule(ID) .with_highlight(span) - .with_fix("change each preamble comment to start with `##` followed by a space") } /// Creates a "preamble comment before directive" diagnostic. @@ -35,7 +34,6 @@ fn preamble_comment_before_directive(span: Span) -> Diagnostic { Diagnostic::note("preamble comments must come after lint directives") .with_rule(ID) .with_highlight(span) - .with_fix("move the preamble comment after the lint directive") } /// Creates a "directive after preamble comment" diagnostic. @@ -43,7 +41,6 @@ fn directive_after_preamble_comment(span: Span) -> Diagnostic { Diagnostic::note("lint directives must come before preamble comments") .with_rule(ID) .with_highlight(span) - .with_fix("move the lint directive before the preamble comment") } /// Creates an "unnecessary whitespace" diagnostic. @@ -51,7 +48,6 @@ fn unnecessary_whitespace(span: Span) -> Diagnostic { Diagnostic::note("unnecessary whitespace in document preamble") .with_rule(ID) .with_highlight(span) - .with_fix("remove the unnecessary whitespace") } /// Creates an "expected a blank line before" diagnostic. @@ -59,7 +55,6 @@ fn expected_blank_line_before_version(span: Span) -> Diagnostic { Diagnostic::note("expected exactly one blank line before the version statement") .with_rule(ID) .with_highlight(span) - .with_fix("add a blank line between the last preamble comment and the version statement") } /// Creates an "expected a blank line before preamble comment" diagnostic. @@ -69,7 +64,6 @@ fn expected_blank_line_before_preamble_comment(span: Span) -> Diagnostic { ) .with_rule(ID) .with_highlight(span) - .with_fix("add a blank line between the last lint directive and the first preamble comment") } /// Detects if a comment is a lint directive. @@ -265,14 +259,17 @@ impl Visitor for PreambleFormattingRule { } (false, true, true, false) => { // Preamble comment followed by lint directive + // Handled by comment visitor return; } (_, _, false, false) => { // anything followed by invalid comment + // Handled by comment visitor return; } (false, false, ..) => { // Invalid comment followed by anything + // Handled by comment visitor return; } _ => { @@ -366,7 +363,7 @@ impl Visitor for PreambleFormattingRule { } } - // Otherwise, look for the next siblings that might also be invalid; + // Otherwise, look for the next siblings that might also be problematic; // if so, consolidate them into a single diagnostic let mut span = comment.span(); let mut current = comment.syntax().next_sibling_or_token(); diff --git a/wdl-lint/src/rules/version_formatting.rs b/wdl-lint/src/rules/version_formatting.rs new file mode 100644 index 00000000..7e50de0b --- /dev/null +++ b/wdl-lint/src/rules/version_formatting.rs @@ -0,0 +1,155 @@ +//! A lint rule that checks the formatting of the version statement. + +use wdl_ast::AstNode; +use wdl_ast::AstToken; +use wdl_ast::Diagnostic; +use wdl_ast::Diagnostics; +use wdl_ast::Document; +use wdl_ast::Span; +use wdl_ast::SupportedVersion; +use wdl_ast::SyntaxKind; +use wdl_ast::ToSpan; +use wdl_ast::VersionStatement; +use wdl_ast::VisitReason; +use wdl_ast::Visitor; +use wdl_ast::Whitespace; + +use crate::Rule; +use crate::Tag; +use crate::TagSet; + +/// The ID of the rule. +const ID: &str = "VersionFormatting"; + +/// Creates a diagnostic for an expected blank line before the version +/// statement. +fn expected_blank_line_before_version(span: Span) -> Diagnostic { + Diagnostic::note( + "expected exactly one blank line between the last comment and the version statement", + ) + .with_rule(ID) + .with_highlight(span) +} + +/// Creates a diagnostic for an expected blank line after the version statement. +fn expected_blank_line_after_version(span: Span) -> Diagnostic { + Diagnostic::note("expected exactly one blank line after the version statement") + .with_rule(ID) + .with_highlight(span) +} + +/// Creates a diagnostic for unexpected whitespace before the version statement. +fn whitespace_before_version(span: Span) -> Diagnostic { + Diagnostic::error("unexpected whitespace before the version statement") + .with_rule(ID) + .with_highlight(span) +} + +/// Creates a diagnostic for a comment inside the version statement. +fn comment_inside_version(span: Span) -> Diagnostic { + Diagnostic::error("unexpected comment inside the version statement") + .with_rule(ID) + .with_highlight(span) +} + +/// Creates a diagnostic for unexpected whitespace inside the version statement. +fn unexpected_whitespace_inside_version(span: Span) -> Diagnostic { + Diagnostic::error("expected exactly one space between 'version' and the version number") + .with_rule(ID) + .with_highlight(span) +} + +/// Detects incorrect formatting of the version statement. +#[derive(Default, Debug, Clone)] +pub struct VersionFormattingRule; + +impl Rule for VersionFormattingRule { + fn id(&self) -> &'static str { + ID + } + + fn description(&self) -> &'static str { + "Checks the formatting of the version statement." + } + + fn explanation(&self) -> &'static str { + "The version statement should be formatted correctly. This rule checks that the version \ + statement is correctly formatted." + } + + fn tags(&self) -> TagSet { + TagSet::new(&[Tag::Style]) + } + + fn exceptable_nodes(&self) -> Option<&'static [SyntaxKind]> { + Some(&[SyntaxKind::VersionStatementNode]) + } +} + +impl Visitor for VersionFormattingRule { + type State = Diagnostics; + + fn document(&mut self, _: &mut Self::State, _: VisitReason, _: &Document, _: SupportedVersion) { + // This is intentionally empty, as this rule has no state. + } + + fn version_statement( + &mut self, + state: &mut Self::State, + reason: VisitReason, + stmt: &VersionStatement, + ) { + if reason == VisitReason::Exit { + return; + } + + // 1. Handle whitespace before the version statement + // If there's a previous sibling or token, it must be whitespace + // because only comments and whitespace may precede the version statement + // and whitespace must come between the last comment and the version statement. + if let Some(prev_ws) = stmt.syntax().prev_sibling_or_token() { + let ws = prev_ws.as_token().expect("expected a token").text(); + // If there's a previous sibling or token, it must be a comment + if let Some(_prev_comment) = prev_ws.prev_sibling_or_token() { + if ws != "\n\n" && ws != "\r\n\r\n" { + state.add(expected_blank_line_before_version( + prev_ws.text_range().to_span(), + )); + } + } else { + state.add(whitespace_before_version(prev_ws.text_range().to_span())); + } + } + + // 2. Handle internal whitespace and comments + for child in stmt + .syntax() + .children_with_tokens() + .filter(|c| c.kind() == SyntaxKind::Whitespace || c.kind() == SyntaxKind::Comment) + { + match child.kind() { + SyntaxKind::Whitespace => { + if child.as_token().expect("expected a token").text() != " " { + state.add(unexpected_whitespace_inside_version( + child.text_range().to_span(), + )); + } + } + SyntaxKind::Comment => { + state.add(comment_inside_version(child.text_range().to_span())); + } + _ => unreachable!(), + } + } + + // 3. Handle whitespace after the version statement + if let Some(next) = stmt.syntax().next_sibling_or_token() { + if let Some(ws) = next.as_token().and_then(|s| Whitespace::cast(s.clone())) { + let s = ws.as_str(); + if s != "\n\n" && s != "\r\n\r\n" { + state.add(expected_blank_line_after_version(ws.span())); + } + } + } // else version is the last item in the document + } +} diff --git a/wdl-lint/tests/lints/comment-whitespace/source.errors b/wdl-lint/tests/lints/comment-whitespace/source.errors index f1fc7ebe..18337f63 100644 --- a/wdl-lint/tests/lints/comment-whitespace/source.errors +++ b/wdl-lint/tests/lints/comment-whitespace/source.errors @@ -1,3 +1,13 @@ +note[VersionFormatting]: expected exactly one blank line after the version statement + ┌─ tests/lints/comment-whitespace/source.wdl:3:12 + │ +3 │ version 1.2 + │ ╭───────────^ +4 │ │ +5 │ │ +6 │ │ ################ + │ ╰^ + note[CommentWhitespace]: comment delimiter should be followed by a single space ┌─ tests/lints/comment-whitespace/source.wdl:8:1 │ diff --git a/wdl-lint/tests/lints/invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/invalid-preamble-comment/source.errors index be6443c6..68cfc4aa 100644 --- a/wdl-lint/tests/lints/invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/invalid-preamble-comment/source.errors @@ -3,14 +3,10 @@ note[PreambleFormatting]: preamble comments must start with `##` followed by a s │ 3 │ # This is an invalid preamble comment. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: change each preamble comment to start with `##` followed by a space note[PreambleFormatting]: preamble comments must start with `##` followed by a space ┌─ tests/lints/invalid-preamble-comment/source.wdl:5:1 │ 5 │ # This one is invalid too! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: change each preamble comment to start with `##` followed by a space diff --git a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors index e69de29b..3f7cae31 100644 --- a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors +++ b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors @@ -0,0 +1,8 @@ +note[VersionFormatting]: expected exactly one blank line after the version statement + ┌─ tests/lints/missing-blank-line-after-version/source.wdl:5:12 + │ +5 │ version 1.1 + │ ╭───────────^ +6 │ │ workflow test { + │ ╰^ + diff --git a/wdl-lint/tests/lints/missing-comment-space/source.errors b/wdl-lint/tests/lints/missing-comment-space/source.errors index 9daab15c..6aeebb3d 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.errors +++ b/wdl-lint/tests/lints/missing-comment-space/source.errors @@ -3,8 +3,6 @@ note[PreambleFormatting]: preamble comments must start with `##` followed by a s │ 3 │ ##This preamble comment is missing a space. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: change each preamble comment to start with `##` followed by a space note[Whitespace]: line contains trailing whitespace ┌─ tests/lints/missing-comment-space/source.wdl:4:3 diff --git a/wdl-lint/tests/lints/missing-preamble-ws/source.errors b/wdl-lint/tests/lints/missing-preamble-ws/source.errors index e69de29b..4393b651 100644 --- a/wdl-lint/tests/lints/missing-preamble-ws/source.errors +++ b/wdl-lint/tests/lints/missing-preamble-ws/source.errors @@ -0,0 +1,8 @@ +note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement + ┌─ tests/lints/missing-preamble-ws/source.wdl:3:50 + │ +3 │ ## This is a test of missing preamble whitespace. + │ ╭─────────────────────────────────────────────────^ +4 │ │ version 1.1 + │ ╰^ + diff --git a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors index 65cdc7e0..758498c7 100644 --- a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors @@ -9,6 +9,4 @@ note[PreambleFormatting]: preamble comments must start with `##` followed by a s 12 │ │ # as a single diagnostic 13 │ │ # warning │ ╰─────────^ - │ - = fix: change each preamble comment to start with `##` followed by a space diff --git a/wdl-lint/tests/lints/one-line-after-version/source.errors b/wdl-lint/tests/lints/one-line-after-version/source.errors index c3558bd3..09e50adb 100644 --- a/wdl-lint/tests/lints/one-line-after-version/source.errors +++ b/wdl-lint/tests/lints/one-line-after-version/source.errors @@ -4,3 +4,11 @@ error: there must be at least one task, workflow, or struct definition in the fi 6 │ │ +note[VersionFormatting]: expected exactly one blank line after the version statement + ┌─ tests/lints/one-line-after-version/source.wdl:5:12 + │ +5 │ version 1.1 + │ ╭───────────^ +6 │ │ + │ ╰^ + diff --git a/wdl-lint/tests/lints/preamble-comment-after-version/source.errors b/wdl-lint/tests/lints/preamble-comment-after-version/source.errors index 0e38aec8..7c6a807d 100644 --- a/wdl-lint/tests/lints/preamble-comment-after-version/source.errors +++ b/wdl-lint/tests/lints/preamble-comment-after-version/source.errors @@ -3,6 +3,4 @@ note[PreambleFormatting]: unnecessary whitespace in document preamble │ 4 │ ## Bad leading whitespace! │ ^^^^^^^ - │ - = fix: remove the unnecessary whitespace diff --git a/wdl-lint/tests/lints/preamble-ws/source.errors b/wdl-lint/tests/lints/preamble-ws/source.errors index 65f7e6db..effde666 100644 --- a/wdl-lint/tests/lints/preamble-ws/source.errors +++ b/wdl-lint/tests/lints/preamble-ws/source.errors @@ -5,6 +5,12 @@ note[PreambleFormatting]: expected exactly one blank line between lint directive │ ╭────────────────────────────────────────────────────────^ 2 │ │ ## This is a test of both missing and extraneous preamble whitespace. │ ╰^ + +note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement + ┌─ tests/lints/preamble-ws/source.wdl:2:70 │ - = fix: add a blank line between the last lint directive and the first preamble comment +2 │ ## This is a test of both missing and extraneous preamble whitespace. + │ ╭─────────────────────────────────────────────────────────────────────^ +3 │ │ version 1.1 + │ ╰────────^ diff --git a/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors b/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors index 8505ae40..a2233d43 100644 --- a/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors +++ b/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors @@ -3,14 +3,10 @@ note[PreambleFormatting]: preamble comments must start with `##` followed by a s │ 3 │ ### This comment has too many pound signs! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: change each preamble comment to start with `##` followed by a space note[PreambleFormatting]: preamble comments must start with `##` followed by a space ┌─ tests/lints/too-many-pounds-preamble/source.wdl:5:1 │ 5 │ ###### This comment also has too many pound signs! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: change each preamble comment to start with `##` followed by a space diff --git a/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors b/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors index de834e1f..81fbfd48 100644 --- a/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors +++ b/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors @@ -13,8 +13,6 @@ note[PreambleFormatting]: expected exactly one blank line between lint directive │ ╭─────────────────────────────────────────────────────────^ 2 │ │ ## This is a preamble comment with whitespace trailing │ ╰^ - │ - = fix: add a blank line between the last lint directive and the first preamble comment note[Whitespace]: line contains trailing whitespace ┌─ tests/lints/trailing-comment-whitespace/source.wdl:2:55 diff --git a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors index e69de29b..5d15169e 100644 --- a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors +++ b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors @@ -0,0 +1,11 @@ +note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement + ┌─ tests/lints/unnecessary-preamble-ws/source.wdl:5:88 + │ +5 │ ## The second is for the whitespace between the end of that line to the version keyword + │ ╭───────────────────────────────────────────────────────────────────────────────────────^ +6 │ │ +7 │ │ +8 │ │ +9 │ │ version 1.1 + │ ╰──^ + diff --git a/wdl-lint/tests/lints/ws-after-blank-line/source.errors b/wdl-lint/tests/lints/ws-after-blank-line/source.errors index e69de29b..6114316f 100644 --- a/wdl-lint/tests/lints/ws-after-blank-line/source.errors +++ b/wdl-lint/tests/lints/ws-after-blank-line/source.errors @@ -0,0 +1,10 @@ +note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement + ┌─ tests/lints/ws-after-blank-line/source.wdl:3:52 + │ +3 │ ## This is a test of whitespace after a blank line. + │ ╭───────────────────────────────────────────────────^ +4 │ │ +5 │ │ +6 │ │ version 1.1 + │ ╰^ + diff --git a/wdl-lint/tests/lints/ws-before-version/source.errors b/wdl-lint/tests/lints/ws-before-version/source.errors index e69de29b..b10eaeed 100644 --- a/wdl-lint/tests/lints/ws-before-version/source.errors +++ b/wdl-lint/tests/lints/ws-before-version/source.errors @@ -0,0 +1,11 @@ +note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement + ┌─ tests/lints/ws-before-version/source.wdl:1:57 + │ +1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing + │ ╭────────────────────────────────────────────────────────^ +2 │ │ +3 │ │ +4 │ │ +5 │ │ version 1.1 + │ ╰────^ + diff --git a/wdl-lint/tests/lints/ws-preamble-comments/source.errors b/wdl-lint/tests/lints/ws-preamble-comments/source.errors index e5f855c3..8a5a14c9 100644 --- a/wdl-lint/tests/lints/ws-preamble-comments/source.errors +++ b/wdl-lint/tests/lints/ws-preamble-comments/source.errors @@ -5,8 +5,6 @@ note[PreambleFormatting]: unnecessary whitespace in document preamble 5 │ │ 6 │ │ ## The above lines should be a warning, as well as below │ ╰^ - │ - = fix: remove the unnecessary whitespace note[PreambleFormatting]: unnecessary whitespace in document preamble ┌─ tests/lints/ws-preamble-comments/source.wdl:7:1 @@ -14,6 +12,4 @@ note[PreambleFormatting]: unnecessary whitespace in document preamble 7 │ ╭ 8 │ │ ## Last comment │ ╰^ - │ - = fix: remove the unnecessary whitespace From a2392ebef4dcdd9381df00b49511de3dcfbee482 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Fri, 27 Sep 2024 14:46:26 -0400 Subject: [PATCH 17/30] feat: PrambleCommentAfterVersion rule --- Arena.toml | 10 ++ wdl-lint/src/lib.rs | 1 + wdl-lint/src/rules.rs | 2 + .../rules/preamble_comment_after_version.rs | 143 ++++++++++++++++++ .../source.errors | 16 ++ 5 files changed, 172 insertions(+) create mode 100644 wdl-lint/src/rules/preamble_comment_after_version.rs diff --git a/Arena.toml b/Arena.toml index 8540158b..3bbf7f8a 100644 --- a/Arena.toml +++ b/Arena.toml @@ -795,6 +795,11 @@ document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" message = "ww-vc-trio.wdl:109:5: note[CommentWhitespace]: comment not sufficiently indented" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L109" +[[diagnostics]] +document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" +message = "ww-vc-trio.wdl:10:1: error[PreambleCommentAfterVersion]: preamble comment after the version statement" +permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L10" + [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" message = "ww-vc-trio.wdl:110:26: note[CallInputSpacing]: call input not properly spaced" @@ -1135,6 +1140,11 @@ document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" message = "ww-vc-trio.wdl:299:3: warning[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L299" +[[diagnostics]] +document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" +message = "ww-vc-trio.wdl:2:1: error[PreambleCommentAfterVersion]: preamble comment after the version statement" +permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L2" + [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" message = "ww-vc-trio.wdl:2:1: note[BlankLinesBetweenElements]: missing blank line" diff --git a/wdl-lint/src/lib.rs b/wdl-lint/src/lib.rs index f2c236d7..9c6ce3d5 100644 --- a/wdl-lint/src/lib.rs +++ b/wdl-lint/src/lib.rs @@ -113,6 +113,7 @@ pub fn rules() -> Vec> { Box::::default(), Box::::default(), Box::::default(), + Box::::default(), ]; // Ensure all the rule ids are unique and pascal case diff --git a/wdl-lint/src/rules.rs b/wdl-lint/src/rules.rs index a0193228..bdf53767 100644 --- a/wdl-lint/src/rules.rs +++ b/wdl-lint/src/rules.rs @@ -29,6 +29,7 @@ mod missing_runtime; mod no_curly_commands; mod nonmatching_output; mod pascal_case; +mod preamble_comment_after_version; mod preamble_formatting; mod runtime_section_keys; mod section_order; @@ -68,6 +69,7 @@ pub use missing_runtime::*; pub use no_curly_commands::*; pub use nonmatching_output::*; pub use pascal_case::*; +pub use preamble_comment_after_version::*; pub use preamble_formatting::*; pub use runtime_section_keys::*; pub use section_order::*; diff --git a/wdl-lint/src/rules/preamble_comment_after_version.rs b/wdl-lint/src/rules/preamble_comment_after_version.rs new file mode 100644 index 00000000..6d66908e --- /dev/null +++ b/wdl-lint/src/rules/preamble_comment_after_version.rs @@ -0,0 +1,143 @@ +//! A lint rule for flagging preamble comments which are outside the preamble. + +use wdl_ast::AstToken; +use wdl_ast::Comment; +use wdl_ast::Diagnostic; +use wdl_ast::Diagnostics; +use wdl_ast::Document; +use wdl_ast::Span; +use wdl_ast::SyntaxElement; +use wdl_ast::SyntaxKind; +use wdl_ast::VisitReason; +use wdl_ast::Visitor; + +use crate::Rule; +use crate::Tag; +use crate::TagSet; + +/// The identifier for the rule. +const ID: &str = "PreambleCommentAfterVersion"; + +/// Creates a diagnostic for a comment outside the preamble. +fn preamble_comment_outside_preamble(span: Span) -> Diagnostic { + Diagnostic::error("preamble comment after the version statement") + .with_rule(ID) + .with_highlight(span) +} + +/// A lint rule for flagging preamble comments which are outside the preamble. +#[derive(Default, Debug, Clone)] +pub struct PreambleCommentAfterVersionRule { + /// Exited the preamble. + exited_preamble: bool, + /// The number of comment tokens to skip. + /// + /// This is used when consolidating multiple comments into a single + /// diagnositc. + skip_count: usize, +} + +impl Rule for PreambleCommentAfterVersionRule { + fn id(&self) -> &'static str { + ID + } + + fn description(&self) -> &'static str { + "Ensures that preamble comments are inside the preamble." + } + + fn explanation(&self) -> &'static str { + "Preamble comments should be inside the preamble." + } + + fn tags(&self) -> TagSet { + TagSet::new(&[Tag::Clarity]) + } + + fn exceptable_nodes(&self) -> Option<&'static [SyntaxKind]> { + None + } +} + +impl Visitor for PreambleCommentAfterVersionRule { + type State = Diagnostics; + + fn document( + &mut self, + _: &mut Self::State, + reason: VisitReason, + _: &Document, + _: wdl_ast::SupportedVersion, + ) { + if reason == VisitReason::Exit { + return; + } + + // Reset the visitor upon document entry. + *self = Default::default(); + } + + fn version_statement( + &mut self, + _state: &mut Self::State, + reason: VisitReason, + _stmt: &wdl_ast::VersionStatement, + ) { + if reason == VisitReason::Exit { + self.exited_preamble = true; + } + } + + fn comment(&mut self, state: &mut Self::State, comment: &Comment) { + if !self.exited_preamble { + return; + } + + if self.skip_count > 0 { + self.skip_count -= 1; + return; + } + + if !comment.as_str().starts_with("## ") { + return; + } + + let mut span = comment.span(); + let mut current = comment.syntax().next_sibling_or_token(); + while let Some(sibling) = current { + match sibling.kind() { + SyntaxKind::Comment => { + self.skip_count += 1; + + if !sibling + .as_token() + .expect("expected a token") + .text() + .starts_with("## ") + { + // The sibling comment is valid, so we can break. + break; + } + + // Not valid, update the span + span = Span::new( + span.start(), + usize::from(sibling.text_range().end()) - span.start(), + ) + } + SyntaxKind::Whitespace => { + // Skip whitespace + } + _ => break, + } + + current = sibling.next_sibling_or_token(); + } + + state.exceptable_add( + preamble_comment_outside_preamble(span), + SyntaxElement::from(comment.syntax().clone()), + &self.exceptable_nodes(), + ); + } +} diff --git a/wdl-lint/tests/lints/preamble-comment-after-version/source.errors b/wdl-lint/tests/lints/preamble-comment-after-version/source.errors index 7c6a807d..d856f804 100644 --- a/wdl-lint/tests/lints/preamble-comment-after-version/source.errors +++ b/wdl-lint/tests/lints/preamble-comment-after-version/source.errors @@ -4,3 +4,19 @@ note[PreambleFormatting]: unnecessary whitespace in document preamble 4 │ ## Bad leading whitespace! │ ^^^^^^^ +error[PreambleCommentAfterVersion]: preamble comment after the version statement + ┌─ tests/lints/preamble-comment-after-version/source.wdl:8:1 + │ + 8 │ ╭ ## This is a preamble comment after the version + 9 │ │ +10 │ │ ## Also a preamble comment +11 │ │ +12 │ │ ## And this one is bad too! + │ ╰───────────────────────────^ + +error[PreambleCommentAfterVersion]: preamble comment after the version statement + ┌─ tests/lints/preamble-comment-after-version/source.wdl:21:5 + │ +21 │ ## This one is bad! + │ ^^^^^^^^^^^^^^^^^^^ + From 0ff136e5d2342e5fa386a0476af9eea500b0907a Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 30 Sep 2024 10:25:25 -0400 Subject: [PATCH 18/30] [WIP]tests: update wdl-lint tests --- .../between-import-whitespace/source.errors | 50 ++-- .../between-import-whitespace/source.wdl | 18 +- .../source.errors | 248 +++++++++++------- .../blank-lines-between-elements/source.wdl | 9 +- .../command-mixed-line-cont/source.errors | 16 +- .../lints/command-mixed-line-cont/source.wdl | 7 +- .../source.errors | 14 +- .../source.wdl | 11 +- .../command-mixed-spaces-first/source.errors | 16 +- .../command-mixed-spaces-first/source.wdl | 7 +- .../command-mixed-tabs-first/source.errors | 16 +- .../lints/command-mixed-tabs-first/source.wdl | 7 +- .../lints/command-mixed-trailing/source.wdl | 7 +- .../lints/command-mixed-ws-ok/source.wdl | 16 +- .../lints/comment-whitespace/source.errors | 52 ++-- .../tests/lints/comment-whitespace/source.wdl | 24 +- .../tests/lints/container-value/source.errors | 32 +-- .../tests/lints/container-value/source.wdl | 18 +- wdl-lint/tests/lints/curly-command/source.wdl | 10 +- .../tests/lints/deprecated-object/source.wdl | 5 +- .../source.wdl | 5 +- .../source.errors | 12 +- .../source.wdl | 5 +- .../lints/description-missing/source.errors | 12 +- .../lints/description-missing/source.wdl | 9 +- .../lints/disallowed-input-name/source.errors | 16 +- .../lints/disallowed-input-name/source.wdl | 3 +- .../disallowed-output-name/source.errors | 16 +- .../lints/disallowed-output-name/source.wdl | 3 +- .../tests/lints/double-quotes/source.errors | 26 +- wdl-lint/tests/lints/double-quotes/source.wdl | 6 +- wdl-lint/tests/lints/except/source.errors | 2 +- wdl-lint/tests/lints/except/source.wdl | 2 +- .../lints/expression-spacing/source.errors | 104 ++++---- .../tests/lints/expression-spacing/source.wdl | 18 +- .../lints/import-placements/source.errors | 4 +- .../tests/lints/import-placements/source.wdl | 14 +- .../lints/inconsistent-newlines/source.errors | 16 +- .../lints/inconsistent-newlines/source.wdl | 11 +- .../lints/input-not-sorted/source.errors | 32 +-- .../tests/lints/input-not-sorted/source.wdl | 14 +- .../tests/lints/input-spacing/source.errors | 8 + wdl-lint/tests/lints/input-spacing/source.wdl | 10 +- .../invalid-preamble-comment/source.errors | 13 +- .../lints/invalid-preamble-comment/source.wdl | 6 +- .../tests/lints/key-value-pairs/source.errors | 24 ++ .../tests/lints/key-value-pairs/source.wdl | 2 +- wdl-lint/tests/lints/line-width/source.errors | 16 +- wdl-lint/tests/lints/line-width/source.wdl | 13 +- .../lints/matching-param-meta/source.errors | 30 +-- .../lints/matching-param-meta/source.wdl | 35 +-- .../source.errors | 16 +- .../source.wdl | 5 +- .../lints/missing-comment-space/source.errors | 16 +- .../lints/missing-comment-space/source.wdl | 4 +- .../lints/missing-eof-newline/source.errors | 2 +- .../missing-requirements-block/source.errors | 2 +- .../lints/multiple-eof-newline/source.errors | 2 +- .../lints/nonmatching-output/source.errors | 2 +- .../tests/lints/two-eof-newline/source.errors | 2 +- 60 files changed, 655 insertions(+), 466 deletions(-) rename wdl-lint/tests/lints/{command-mixed => command-mixed-same-line}/source.errors (60%) rename wdl-lint/tests/lints/{command-mixed => command-mixed-same-line}/source.wdl (61%) diff --git a/wdl-lint/tests/lints/between-import-whitespace/source.errors b/wdl-lint/tests/lints/between-import-whitespace/source.errors index d8eb55bb..3e45338f 100644 --- a/wdl-lint/tests/lints/between-import-whitespace/source.errors +++ b/wdl-lint/tests/lints/between-import-whitespace/source.errors @@ -1,53 +1,61 @@ note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/between-import-whitespace/source.wdl:8:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:6:1 │ -8 │ ╭ -9 │ │ import "baz.wdl" # BAD +6 │ ╭ +7 │ │ import "baz.wdl" # BAD │ ╰^ │ = fix: remove any blank lines between imports note[ImportWhitespace]: improper whitespace before import statement - ┌─ tests/lints/between-import-whitespace/source.wdl:10:1 - │ -10 │ import "foo.wdl" # BAD - │ ^^^^ extraneous whitespace should not be there - │ - = fix: use minimal whitespace before import statements + ┌─ tests/lints/between-import-whitespace/source.wdl:8:1 + │ +8 │ import "foo.wdl" # BAD + │ ^^^^ extraneous whitespace should not be there + │ + = fix: use minimal whitespace before import statements note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/between-import-whitespace/source.wdl:11:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:9:1 │ -11 │ ╭ -12 │ │ import "huh.wdl" # BAD + 9 │ ╭ +10 │ │ import "huh.wdl" # BAD │ ╰^ │ = fix: remove any blank lines between imports note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/between-import-whitespace/source.wdl:15:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:13:1 │ -15 │ ╭ -16 │ │ # a comment and a blank is still BAD +13 │ ╭ +14 │ │ # a comment and a blank is still BAD │ ╰^ │ = fix: remove any blank lines between imports note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/between-import-whitespace/source.wdl:17:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:15:1 │ -17 │ ╭ -18 │ │ import "wah.wdl" # BAD +15 │ ╭ +16 │ │ import "wah.wdl" # BAD │ ╰^ │ = fix: remove any blank lines between imports note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/between-import-whitespace/source.wdl:20:1 + ┌─ tests/lints/between-import-whitespace/source.wdl:18:1 │ -20 │ ╭ -21 │ │ import "zam.wdl" # 2 blanks will be caught be a _different_ check +18 │ ╭ +19 │ │ import "zam.wdl" # 2 blanks will be caught be a _different_ check │ ╰^ │ = fix: remove the unnecessary blank lines +note[Whitespace]: line contains only whitespace + ┌─ tests/lints/between-import-whitespace/source.wdl:24:1 + │ +24 │ + │ ^^^^ + │ + = fix: remove the whitespace from this line + diff --git a/wdl-lint/tests/lints/between-import-whitespace/source.wdl b/wdl-lint/tests/lints/between-import-whitespace/source.wdl index 145876d2..518446ad 100644 --- a/wdl-lint/tests/lints/between-import-whitespace/source.wdl +++ b/wdl-lint/tests/lints/between-import-whitespace/source.wdl @@ -1,26 +1,26 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing - ## This is a test of whitespace between import statements. version 1.1 -import "bar.wdl" # OK +import "bar.wdl" # OK -import "baz.wdl" # BAD - import "foo.wdl" # BAD +import "baz.wdl" # BAD + import "foo.wdl" # BAD -import "huh.wdl" # BAD +import "huh.wdl" # BAD # but a comment makes it OK -import "vom.wdl" # OK +import "vom.wdl" # OK # a comment and a blank is still BAD -import "wah.wdl" # BAD +import "wah.wdl" # BAD -import "zam.wdl" # 2 blanks will be caught be a _different_ check +import "zam.wdl" # 2 blanks will be caught be a _different_ check workflow test { + #@ except: DescriptionMissing meta {} + output {} } diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors index c47c70f0..3723ab64 100755 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors @@ -1,193 +1,237 @@ note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/blank-lines-between-elements/source.wdl:9:1 - │ - 9 │ ╭ -10 │ │ import "qux" # following whitespace duplication is caught be Whitespace rule - │ ╰^ - │ - = fix: remove any blank lines between imports + ┌─ tests/lints/blank-lines-between-elements/source.wdl:4:1 + │ +4 │ ╭ +5 │ │ import "qux" # following whitespace duplication is caught be Whitespace rule + │ ╰^ + │ + = fix: remove any blank lines between imports note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:12:1 - │ -12 │ ╭ -13 │ │ # test comment - │ ╰^ - │ - = fix: remove the unnecessary blank lines + ┌─ tests/lints/blank-lines-between-elements/source.wdl:7:1 + │ +7 │ ╭ +8 │ │ # test comment + │ ╰^ + │ + = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:14:15 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:9:15 │ -14 │ workflow foo { + 9 │ workflow foo { │ ╭──────────────^ -15 │ │ -16 │ │ # This is OK (but the prior line is not). +10 │ │ +11 │ │ # This is OK (but the prior line is not). │ ╰────^ - │ - = fix: remove the blank line(s) note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:19:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:14:5 │ -19 │ parameter_meta {} +14 │ parameter_meta {} │ ^^^^^^^^^^^^^^^^^ - │ - = fix: add a blank line before this element note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:20:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:15:5 │ -20 │ # what about this comment? +15 │ # what about this comment? │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ - │ - = fix: add a blank line before this element note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:22:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:17:5 │ -22 │ ╭ scatter (i in ["hello", "world"]) { -23 │ │ call bar { input: s = i } -24 │ │ } +17 │ ╭ scatter (i in ["hello", "world"]) { +18 │ │ call bar { input: s = i } +19 │ │ } │ ╰─────^ - │ - = fix: add a blank line before this element note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:30:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:25:1 │ -30 │ ╭ -31 │ │ String q = "bar" # The following whitespace is allowable between private declarations +25 │ ╭ +26 │ │ String q = "bar" # The following whitespace is allowable between private declarations │ ╰────^ │ = fix: remove the unnecessary blank lines note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:36:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:31:1 │ -36 │ ╭ -37 │ │ call bar { input: +31 │ ╭ +32 │ │ call bar { input: │ ╰────^ │ = fix: remove the unnecessary blank lines note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:41:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:36:1 │ -41 │ ╭ -42 │ │ call bar as baz { input: +36 │ ╭ +37 │ │ call bar as baz { input: │ ╰────^ │ = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:49:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:1 │ -49 │ ╭ task bar { -50 │ │ -51 │ │ meta { -52 │ │ +46 │ ╭ task bar { +47 │ │ +48 │ │ meta { +49 │ │ · │ -72 │ │ -73 │ │ } +69 │ │ +70 │ │ } │ ╰─^ - │ - = fix: add a blank line before this element + +note[MissingMetas]: task `bar` is missing a `parameter_meta` section + ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:6 + │ +46 │ task bar { + │ ^^^ this task is missing a `parameter_meta` section + │ + = fix: add a `parameter_meta` section to the task + +warning[MissingRuntime]: task `bar` is missing a `runtime` section + ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:6 + │ +46 │ task bar { + │ ^^^ this task is missing a `runtime` section + │ + = fix: add a `runtime` section to the task note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:49:11 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:11 │ -49 │ task bar { +46 │ task bar { │ ╭──────────^ -50 │ │ -51 │ │ meta { +47 │ │ +48 │ │ meta { │ ╰────^ - │ - = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:51:11 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:11 │ -51 │ meta { +48 │ meta { │ ╭──────────^ -52 │ │ -53 │ │ description: "bar" +49 │ │ +50 │ │ description: "bar" │ ╰────────^ - │ - = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:53:27 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:50:27 │ -53 │ description: "bar" +50 │ description: "bar" │ ╭──────────────────────────^ -54 │ │ -55 │ │ outputs: { +51 │ │ +52 │ │ outputs: { │ ╰────────^ - │ - = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:56:19 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:53:19 │ -56 │ u: "u" +53 │ u: "u" │ ╭──────────────────^ -57 │ │ -58 │ │ } +54 │ │ +55 │ │ } │ ╰────────^ + +note[InputSorting]: input not sorted + ┌─ tests/lints/blank-lines-between-elements/source.wdl:58:5 + │ +58 │ ╭ input { +59 │ │ String s = "hello" +60 │ │ +61 │ │ String? t +62 │ │ } + │ ╰─────^ input section must be sorted │ - = fix: remove the blank line(s) + = fix: sort input statements as: + String? t + String s = "hello" + +note[DisallowedInputName]: declaration identifier must be at least 3 characters + ┌─ tests/lints/blank-lines-between-elements/source.wdl:59:16 + │ +59 │ String s = "hello" + │ ^ + │ + = fix: rename the declaration to a name with at least 3 characters note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:62:27 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:59:27 │ -62 │ String s = "hello" +59 │ String s = "hello" │ ╭──────────────────────────^ -63 │ │ -64 │ │ String? t +60 │ │ +61 │ │ String? t │ ╰────────^ - │ - = fix: remove the blank line(s) + +note[DisallowedInputName]: declaration identifier must be at least 3 characters + ┌─ tests/lints/blank-lines-between-elements/source.wdl:61:17 + │ +61 │ String? t + │ ^ + │ + = fix: rename the declaration to a name with at least 3 characters + +note[DisallowedOutputName]: declaration identifier must be at least 3 characters + ┌─ tests/lints/blank-lines-between-elements/source.wdl:67:16 + │ +67 │ String u = "u" + │ ^ + │ + = fix: rename the declaration to a name with at least 3 characters + +note[DescriptionMissing]: task `bax` is missing a description key + ┌─ tests/lints/blank-lines-between-elements/source.wdl:73:5 + │ +73 │ meta {} + │ ^^^^ + │ + = fix: add a `description` key to this meta section note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:80:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:77:1 │ -80 │ ╭ -81 │ │ input {} +77 │ ╭ +78 │ │ input {} │ ╰────^ │ = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:87:14 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:84:14 │ -87 │ runtime { +84 │ runtime { │ ╭─────────────^ -88 │ │ -89 │ │ disks: "50 GB" +85 │ │ +86 │ │ disks: "50 GB" │ ╰────────^ - │ - = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:90:23 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:87:23 │ -90 │ memory: "4 GB" +87 │ memory: "4 GB" │ ╭──────────────────────^ -91 │ │ -92 │ │ container: "ubuntu:latest" +88 │ │ +89 │ │ container: "ubuntu:latest" │ ╰────────^ - │ - = fix: remove the blank line(s) + +note[ContainerValue]: container URI uses a mutable tag + ┌─ tests/lints/blank-lines-between-elements/source.wdl:89:20 + │ +89 │ container: "ubuntu:latest" + │ ^^^^^^^^^^^^^^^ + │ + = fix: replace the mutable tag with its SHA256 equivalent (e.g., `ubuntu@sha256:foobar` instead of `ubuntu:latest`) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:92:35 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:89:35 │ -92 │ container: "ubuntu:latest" +89 │ container: "ubuntu:latest" │ ╭──────────────────────────────────^ -93 │ │ -94 │ │ } +90 │ │ +91 │ │ } │ ╰────^ - │ - = fix: remove the blank line(s) diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl b/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl index 08477008..e71515f7 100644 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl @@ -1,8 +1,3 @@ -#@ except: ContainerValue, DescriptionMissing, DisallowedInputName, DisallowedOutputName -#@ except: InputSorting, LineWidth, MissingMetas, MissingOutput, MissingRuntime - -## CommentWhitespace, ImportWhitespace, and Whitespace are left enabled to understand all whitespace diagnostics. - version 1.1 import "baz" # following whitespace will be caught by ImportWhitespace rule @@ -14,7 +9,7 @@ import "qux" # following whitespace duplication is caught be Whitespace rule workflow foo { # This is OK (but the prior line is not). - # So is this. + #@ except: DescriptionMissing meta {} parameter_meta {} # what about this comment? @@ -45,6 +40,8 @@ workflow foo { call bar as qux { input: # Calls may optionally be separated by whitespace. s = s } + + output {} } task bar { diff --git a/wdl-lint/tests/lints/command-mixed-line-cont/source.errors b/wdl-lint/tests/lints/command-mixed-line-cont/source.errors index fe9c9d21..8f0820f6 100644 --- a/wdl-lint/tests/lints/command-mixed-line-cont/source.errors +++ b/wdl-lint/tests/lints/command-mixed-line-cont/source.errors @@ -1,21 +1,21 @@ warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-line-cont/source.wdl:13:2 + ┌─ tests/lints/command-mixed-line-cont/source.wdl:14:2 │ -11 │ command <<< +12 │ command <<< │ ------- this command section uses both tabs and spaces in leading whitespace -12 │ this line has a continuation / -13 │ and should be a warning +13 │ this line has a continuation / +14 │ and should be a warning │ ^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-line-cont/source.wdl:26:2 + ┌─ tests/lints/command-mixed-line-cont/source.wdl:30:2 │ -24 │ command { +28 │ command { │ ------- this command section uses both tabs and spaces in leading whitespace -25 │ this line has a continuation / -26 │ and should be a warning +29 │ this line has a continuation / +30 │ and should be a warning │ ^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation diff --git a/wdl-lint/tests/lints/command-mixed-line-cont/source.wdl b/wdl-lint/tests/lints/command-mixed-line-cont/source.wdl index 7a4ab4e2..a25c2095 100644 --- a/wdl-lint/tests/lints/command-mixed-line-cont/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-line-cont/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NoCurlyCommands, NonmatchingOutput, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test of having mixed indentation in a line continuation. @@ -6,6 +6,7 @@ version 1.1 task test1 { meta {} + parameter_meta {} command <<< @@ -14,18 +15,22 @@ task test1 { >>> output {} + runtime {} } task test2 { meta {} + parameter_meta {} + #@ except: NoCurlyCommands command { this line has a continuation \ and should be a warning } output {} + runtime {} } diff --git a/wdl-lint/tests/lints/command-mixed/source.errors b/wdl-lint/tests/lints/command-mixed-same-line/source.errors similarity index 60% rename from wdl-lint/tests/lints/command-mixed/source.errors rename to wdl-lint/tests/lints/command-mixed-same-line/source.errors index 1e525ce4..972b97dd 100644 --- a/wdl-lint/tests/lints/command-mixed/source.errors +++ b/wdl-lint/tests/lints/command-mixed-same-line/source.errors @@ -1,20 +1,20 @@ warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed/source.wdl:12:3 + ┌─ tests/lints/command-mixed-same-line/source.wdl:13:3 │ -11 │ command <<< +12 │ command <<< │ ------- this command section uses both tabs and spaces in leading whitespace -12 │ this line has both tabs and spaces +13 │ this line starts with tabs and ends with spaces │ ^ indented with tabs until this space │ = fix: use the same whitespace character for indentation warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed/source.wdl:24:3 + ┌─ tests/lints/command-mixed-same-line/source.wdl:28:5 │ -23 │ command { +27 │ command { │ ------- this command section uses both tabs and spaces in leading whitespace -24 │ this line has both tabs and spaces - │ ^ indented with tabs until this space +28 │ this line starts with spaces and ends with tabs + │ ^^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation diff --git a/wdl-lint/tests/lints/command-mixed/source.wdl b/wdl-lint/tests/lints/command-mixed-same-line/source.wdl similarity index 61% rename from wdl-lint/tests/lints/command-mixed/source.wdl rename to wdl-lint/tests/lints/command-mixed-same-line/source.wdl index e4ada0a4..a86ead03 100644 --- a/wdl-lint/tests/lints/command-mixed/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-same-line/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, LineWidth, NoCurlyCommands, DescriptionMissing, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test of having mixed indentation on the same line in command sections. @@ -6,24 +6,29 @@ version 1.1 task test1 { meta {} + parameter_meta {} command <<< - this line has both tabs and spaces + this line starts with tabs and ends with spaces >>> output {} + runtime {} } task test2 { meta {} + parameter_meta {} + #@ except: NoCurlyCommands command { - this line has both tabs and spaces + this line starts with spaces and ends with tabs } output {} + runtime {} } diff --git a/wdl-lint/tests/lints/command-mixed-spaces-first/source.errors b/wdl-lint/tests/lints/command-mixed-spaces-first/source.errors index 83d40e1e..f45ca1a8 100644 --- a/wdl-lint/tests/lints/command-mixed-spaces-first/source.errors +++ b/wdl-lint/tests/lints/command-mixed-spaces-first/source.errors @@ -1,21 +1,21 @@ warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-spaces-first/source.wdl:13:1 + ┌─ tests/lints/command-mixed-spaces-first/source.wdl:14:1 │ -11 │ command <<< +12 │ command <<< │ ------- this command section uses both tabs and spaces in leading whitespace -12 │ this line is prefixed with spaces -13 │ this line is prefixed with ~{"tabs"} +13 │ this line is prefixed with spaces +14 │ this line is prefixed with ~{"tabs"} │ ^^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-spaces-first/source.wdl:26:1 + ┌─ tests/lints/command-mixed-spaces-first/source.wdl:30:1 │ -24 │ command { +28 │ command { │ ------- this command section uses both tabs and spaces in leading whitespace -25 │ this line is prefixed with spaces -26 │ this line is prefixed with ~{"tabs"} +29 │ this line is prefixed with spaces +30 │ this line is prefixed with ~{"tabs"} │ ^^^^ indented with spaces until this tab │ = fix: use the same whitespace character for indentation diff --git a/wdl-lint/tests/lints/command-mixed-spaces-first/source.wdl b/wdl-lint/tests/lints/command-mixed-spaces-first/source.wdl index 8032ce80..319f591b 100644 --- a/wdl-lint/tests/lints/command-mixed-spaces-first/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-spaces-first/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NoCurlyCommands, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test of having spaces before tabs in command sections. @@ -6,6 +6,7 @@ version 1.1 task test1 { meta {} + parameter_meta {} command <<< @@ -14,18 +15,22 @@ task test1 { >>> output {} + runtime {} } task test2 { meta {} + parameter_meta {} + #@ except: NoCurlyCommands command { this line is prefixed with spaces this line is prefixed with ~{"tabs"} } output {} + runtime {} } diff --git a/wdl-lint/tests/lints/command-mixed-tabs-first/source.errors b/wdl-lint/tests/lints/command-mixed-tabs-first/source.errors index 982a6d90..0a830e37 100644 --- a/wdl-lint/tests/lints/command-mixed-tabs-first/source.errors +++ b/wdl-lint/tests/lints/command-mixed-tabs-first/source.errors @@ -1,21 +1,21 @@ warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-tabs-first/source.wdl:13:1 + ┌─ tests/lints/command-mixed-tabs-first/source.wdl:14:1 │ -11 │ command <<< +12 │ command <<< │ ------- this command section uses both tabs and spaces in leading whitespace -12 │ this line is prefixed with ~{"tabs"} -13 │ this line is prefixed with spaces +13 │ this line is prefixed with ~{"tabs"} +14 │ this line is prefixed with spaces │ ^ indented with tabs until this space │ = fix: use the same whitespace character for indentation warning[CommandSectionMixedIndentation]: mixed indentation within a command - ┌─ tests/lints/command-mixed-tabs-first/source.wdl:26:1 + ┌─ tests/lints/command-mixed-tabs-first/source.wdl:30:1 │ -24 │ command { +28 │ command { │ ------- this command section uses both tabs and spaces in leading whitespace -25 │ this line is prefixed with ~{"tabs"} -26 │ this line is prefixed with spaces +29 │ this line is prefixed with ~{"tabs"} +30 │ this line is prefixed with spaces │ ^ indented with tabs until this space │ = fix: use the same whitespace character for indentation diff --git a/wdl-lint/tests/lints/command-mixed-tabs-first/source.wdl b/wdl-lint/tests/lints/command-mixed-tabs-first/source.wdl index cbcd9ed9..d80639fc 100644 --- a/wdl-lint/tests/lints/command-mixed-tabs-first/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-tabs-first/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NoCurlyCommands, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test of having tabs before spaces in command sections. @@ -6,6 +6,7 @@ version 1.1 task test1 { meta {} + parameter_meta {} command <<< @@ -14,18 +15,22 @@ task test1 { >>> output {} + runtime {} } task test2 { meta {} + parameter_meta {} + #@ except: NoCurlyCommands command { this line is prefixed with ~{"tabs"} this line is prefixed with spaces } output {} + runtime {} } diff --git a/wdl-lint/tests/lints/command-mixed-trailing/source.wdl b/wdl-lint/tests/lints/command-mixed-trailing/source.wdl index 8aa7d169..a38296f9 100644 --- a/wdl-lint/tests/lints/command-mixed-trailing/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-trailing/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NoCurlyCommands, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test of having mixed _trailing_ indentation in command sections. ## There should be no warnings from the `CommandSectionMixedIndentation` rule. @@ -7,6 +7,7 @@ version 1.1 task test1 { meta {} + parameter_meta {} command <<< @@ -14,17 +15,21 @@ task test1 { >>> output {} + runtime {} } task test2 { meta {} + parameter_meta {} + #@ except: NoCurlyCommands command { this line is prefixed with ${"spaces and has tailing mixed indentation"} } output {} + runtime {} } diff --git a/wdl-lint/tests/lints/command-mixed-ws-ok/source.wdl b/wdl-lint/tests/lints/command-mixed-ws-ok/source.wdl index 61d107d7..3d88c53b 100644 --- a/wdl-lint/tests/lints/command-mixed-ws-ok/source.wdl +++ b/wdl-lint/tests/lints/command-mixed-ws-ok/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, ExpressionSpacing, LineWidth, NoCurlyCommands, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test of having mixed indentation inside of a placeholder. ## This should not cause a warning for the `CommandSectionMixedIndentation` rule. @@ -7,33 +7,37 @@ version 1.1 task test1 { meta {} + parameter_meta {} command <<< - this line is ~{ + this line is ~{( if true then "split across multiple lines with mixed indentation" else "by a placeholder" - } but is all one literal line in the command text + )} but is all one literal line in the command text >>> output {} + runtime {} } task test2 { meta {} + parameter_meta {} - # This will warn only about using curly braces. + #@ except: NoCurlyCommands command { - this line is ~{ + this line is ${( if true then "split across multiple lines with mixed indentation" else "by a placeholder" - } but is all one literal line in the command text + )} but is all one literal line in the command text } output {} + runtime {} } diff --git a/wdl-lint/tests/lints/comment-whitespace/source.errors b/wdl-lint/tests/lints/comment-whitespace/source.errors index 18337f63..3666c58f 100644 --- a/wdl-lint/tests/lints/comment-whitespace/source.errors +++ b/wdl-lint/tests/lints/comment-whitespace/source.errors @@ -1,73 +1,71 @@ -note[VersionFormatting]: expected exactly one blank line after the version statement - ┌─ tests/lints/comment-whitespace/source.wdl:3:12 - │ -3 │ version 1.2 - │ ╭───────────^ -4 │ │ -5 │ │ -6 │ │ ################ - │ ╰^ - note[CommentWhitespace]: comment delimiter should be followed by a single space - ┌─ tests/lints/comment-whitespace/source.wdl:8:1 + ┌─ tests/lints/comment-whitespace/source.wdl:5:1 │ -8 │ #a bad comment +5 │ #a bad comment │ ^ │ = fix: follow this comment delimiter with a single space note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:9:5 + ┌─ tests/lints/comment-whitespace/source.wdl:6:5 │ -9 │ # another bad comment +6 │ # another bad comment │ ^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 1 levels of indentation. It should have 0 levels of indentation. +note[Whitespace]: line contains trailing whitespace + ┌─ tests/lints/comment-whitespace/source.wdl:9:37 + │ +9 │ # a comment with trailing whitespace + │ ^^^^^^^^^^ + │ + = fix: remove this trailing whitespace + note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:14:15 + ┌─ tests/lints/comment-whitespace/source.wdl:12:15 │ -14 │ workflow foo {# test in-line comment without preceding whitespace +12 │ workflow foo {# test in-line comment without preceding whitespace │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:15:11 + ┌─ tests/lints/comment-whitespace/source.wdl:14:11 │ -15 │ meta {# this is a problematic yet valid comment - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +14 │ meta {# this is a problematic comment + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:18:13 + ┌─ tests/lints/comment-whitespace/source.wdl:17:13 │ -18 │ input { # a bad comment +17 │ input { # a bad comment │ ^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[CommentWhitespace]: comment not sufficiently indented - ┌─ tests/lints/comment-whitespace/source.wdl:20:5 + ┌─ tests/lints/comment-whitespace/source.wdl:19:5 │ -20 │ # another bad comment +19 │ # another bad comment │ ^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 1 levels of indentation. It should have 2 levels of indentation. note[CommentWhitespace]: comment has too much indentation - ┌─ tests/lints/comment-whitespace/source.wdl:21:13 + ┌─ tests/lints/comment-whitespace/source.wdl:20:13 │ -21 │ # yet another bad comment +20 │ # yet another bad comment │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment has 3 levels of indentation. It should have 2 levels of indentation. note[CommentWhitespace]: in-line comments should be preceded by two spaces - ┌─ tests/lints/comment-whitespace/source.wdl:22:34 + ┌─ tests/lints/comment-whitespace/source.wdl:21:34 │ -22 │ String foo = "bar" # too much space for an inline comment +21 │ String foo = "bar" # too much space for an inline comment │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces diff --git a/wdl-lint/tests/lints/comment-whitespace/source.wdl b/wdl-lint/tests/lints/comment-whitespace/source.wdl index 2380d3f6..2e1b6cc1 100644 --- a/wdl-lint/tests/lints/comment-whitespace/source.wdl +++ b/wdl-lint/tests/lints/comment-whitespace/source.wdl @@ -1,18 +1,17 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, DisallowedOutputName, ExpressionSpacing, LineWidth, MissingMetas, NonmatchingOutput, TrailingComma, Whitespace +#@ except: ExpressionSpacing, BlankLinesBetweenElements version 1.2 - -################ - #a bad comment # another bad comment # a good comment # a comment with trailing whitespace +#@ except: MissingMetas, NonmatchingOutput workflow foo {# test in-line comment without preceding whitespace - meta {# this is a problematic yet valid comment + #@ except: DescriptionMissing + meta {# this is a problematic comment } input { # a bad comment @@ -22,13 +21,14 @@ workflow foo {# test in-line comment without preceding whitespace String foo = "bar" # too much space for an inline comment } + #@ except: DisallowedOutputName output { # a fine comment # what about this one? - + # an OK comment String bar = foo - Int a = 5 / + Int a = 5 / # a comment 10 / ( @@ -71,7 +71,7 @@ workflow foo {# test in-line comment without preceding whitespace Boolean h = [1,2,3] == [1,2,3] Boolean i = [1 # a comment - ,2,3] == [1,2,4] + ,2,3,] == [1,2,4] Boolean j = [ 1, 2, @@ -101,7 +101,7 @@ workflow foo {# test in-line comment without preceding whitespace Boolean l = { # comment "a": 1, - "b": 2 + "b": 2, } == { "b": 2, "a": 1, @@ -110,7 +110,7 @@ workflow foo {# test in-line comment without preceding whitespace Boolean m = { # comment "a": 1, - "b": 2 + "b": 2, } == { "b": 2, @@ -120,7 +120,7 @@ workflow foo {# test in-line comment without preceding whitespace Boolean n = { # comment "a": 1, - "b": 2 + "b": 2, } == { @@ -131,7 +131,7 @@ workflow foo {# test in-line comment without preceding whitespace Boolean o = { # comment "a": 1, - "b": 2 + "b": 2, } == { "b": 2, "a": 1, diff --git a/wdl-lint/tests/lints/container-value/source.errors b/wdl-lint/tests/lints/container-value/source.errors index 9e07aef8..af5a3554 100644 --- a/wdl-lint/tests/lints/container-value/source.errors +++ b/wdl-lint/tests/lints/container-value/source.errors @@ -1,63 +1,63 @@ warning[ContainerValue]: container URI is missing a tag - ┌─ tests/lints/container-value/source.wdl:19:20 + ┌─ tests/lints/container-value/source.wdl:20:20 │ -19 │ container: "ubuntu" +20 │ container: "ubuntu" │ ^^^^^^^^ │ = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) note[ContainerValue]: container URI uses a mutable tag - ┌─ tests/lints/container-value/source.wdl:35:20 + ┌─ tests/lints/container-value/source.wdl:37:20 │ -35 │ container: "ubuntu:latest" +37 │ container: "ubuntu:latest" │ ^^^^^^^^^^^^^^^ │ = fix: replace the mutable tag with its SHA256 equivalent (e.g., `ubuntu@sha256:foobar` instead of `ubuntu:latest`) warning[ContainerValue]: container URI is missing a tag - ┌─ tests/lints/container-value/source.wdl:85:17 + ┌─ tests/lints/container-value/source.wdl:90:17 │ -85 │ docker: "ubuntu" +90 │ docker: "ubuntu" │ ^^^^^^^^ │ = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) note[ContainerValue]: container URI uses a mutable tag - ┌─ tests/lints/container-value/source.wdl:102:17 + ┌─ tests/lints/container-value/source.wdl:108:17 │ -102 │ docker: "ubuntu:latest" +108 │ docker: "ubuntu:latest" │ ^^^^^^^^^^^^^^^ │ = fix: replace the mutable tag with its SHA256 equivalent (e.g., `ubuntu@sha256:foobar` instead of `ubuntu:latest`) note[ContainerValue]: an array with a single value should be a string literal - ┌─ tests/lints/container-value/source.wdl:134:21 + ┌─ tests/lints/container-value/source.wdl:142:21 │ -134 │ container: ["*"] +142 │ container: ["*"] │ ^^^ │ = fix: change the array to a string literal representing the first value note[ContainerValue]: arrays containing any are ambiguous - ┌─ tests/lints/container-value/source.wdl:150:21 + ┌─ tests/lints/container-value/source.wdl:159:21 │ -150 │ container: ["*", "foo", "*", "*"] +159 │ container: ["*", "foo", "*", "*"] │ ^^^ --- --- │ = fix: remove these entries or change the array to a string literal with the value of `*` warning[ContainerValue]: container URI is missing a tag - ┌─ tests/lints/container-value/source.wdl:150:26 + ┌─ tests/lints/container-value/source.wdl:159:26 │ -150 │ container: ["*", "foo", "*", "*"] +159 │ container: ["*", "foo", "*", "*"] │ ^^^^^ │ = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) note[ContainerValue]: empty arrays are ambiguous and should contain at least one entry - ┌─ tests/lints/container-value/source.wdl:166:20 + ┌─ tests/lints/container-value/source.wdl:176:20 │ -166 │ container: [] +176 │ container: [] │ ^^ │ = fix: add an entry or remove the entry altogether diff --git a/wdl-lint/tests/lints/container-value/source.wdl b/wdl-lint/tests/lints/container-value/source.wdl index bcde34c6..65769029 100644 --- a/wdl-lint/tests/lints/container-value/source.wdl +++ b/wdl-lint/tests/lints/container-value/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, Todo, MissingRequirements +#@ except: DescriptionMissing, Todo, MissingRequirements ## This is a test of the `ContainerValue` lint. @@ -6,6 +6,7 @@ version 1.2 task a { meta {} + parameter_meta {} command <<< @@ -22,6 +23,7 @@ task a { task b { meta {} + parameter_meta {} command <<< @@ -38,6 +40,7 @@ task b { task c { meta {} + parameter_meta {} command <<< @@ -54,6 +57,7 @@ task c { task d { meta {} + parameter_meta {} command <<< @@ -71,6 +75,7 @@ task d { task e { meta {} + parameter_meta {} command <<< @@ -80,7 +85,7 @@ task e { output {} runtime { - # This is the same as task a but with the deprecated 'docker' key name, so it + # This is the same as `task a` but with the deprecated 'docker' key name, so it # should be flagged as missing a tag. docker: "ubuntu" } @@ -88,6 +93,7 @@ task e { task f { meta {} + parameter_meta {} command <<< @@ -97,7 +103,7 @@ task f { output {} runtime { - # This is the same as task b but with the deprecated 'docker' key name, so it + # This is the same as `task b` but with the deprecated 'docker' key name, so it # should be flagged as a mutable tag. docker: "ubuntu:latest" } @@ -105,6 +111,7 @@ task f { task g { meta {} + parameter_meta {} command <<< @@ -121,6 +128,7 @@ task g { task h { meta {} + parameter_meta {} command <<< @@ -137,6 +145,7 @@ task h { task i { meta {} + parameter_meta {} command <<< @@ -153,6 +162,7 @@ task i { task j { meta {} + parameter_meta {} command <<< @@ -169,6 +179,7 @@ task j { task k { meta {} + parameter_meta {} command <<< @@ -184,6 +195,7 @@ task k { task l { meta {} + parameter_meta { image: "The docker image to use" } diff --git a/wdl-lint/tests/lints/curly-command/source.wdl b/wdl-lint/tests/lints/curly-command/source.wdl index fb83aee6..a44f381a 100644 --- a/wdl-lint/tests/lints/curly-command/source.wdl +++ b/wdl-lint/tests/lints/curly-command/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, SectionOrdering, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test of the `NoCurlyCommands` lint @@ -6,24 +6,28 @@ version 1.1 task bad { meta {} + parameter_meta {} - runtime {} command { echo "Hello, World!" } output {} + + runtime {} } task good { meta {} + parameter_meta {} - runtime {} command <<< echo "Hello, World!" >>> output {} + + runtime {} } diff --git a/wdl-lint/tests/lints/deprecated-object/source.wdl b/wdl-lint/tests/lints/deprecated-object/source.wdl index 2e49bef6..8b43a1dd 100644 --- a/wdl-lint/tests/lints/deprecated-object/source.wdl +++ b/wdl-lint/tests/lints/deprecated-object/source.wdl @@ -1,10 +1,10 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, MissingMetas, NonmatchingOutput, SectionOrdering - ## This is a test of the `DeprecatedObject` lint version 1.1 +#@ except: MissingMetas, NonmatchingOutput workflow test { + #@ except: DescriptionMissing meta {} input { @@ -20,7 +20,6 @@ workflow test { Object another_bound_literal_object = object { bar: "baz" } - #@ except: DeprecatedObject Object but_this_is_okay = object { quux: 42 diff --git a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.0/source.wdl b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.0/source.wdl index 8b06a02f..f956dbc2 100644 --- a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.0/source.wdl +++ b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.0/source.wdl @@ -1,5 +1,3 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing,RuntimeSectionKeys - ## This is a test of the `DeprecatedPlaceholderOption` lint. version 1.0 @@ -7,6 +5,7 @@ version 1.0 # None of these lints should trigger as the version is WDL v1.0 (prior to # placeholder options being deprecated). task a_task { + #@ except: DescriptionMissing meta {} String bad_sep_option = "~{sep="," numbers}" @@ -20,5 +19,7 @@ task a_task { >>> output {} + + #@ except: RuntimeSectionKeys runtime {} } diff --git a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors index da664f2d..07521d2d 100644 --- a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors +++ b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.errors @@ -1,4 +1,4 @@ -warning[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder option +note[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder option ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:10:32 │ 10 │ String bad_sep_option = "~{sep="," numbers}" @@ -6,7 +6,7 @@ warning[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder op │ = fix: replace the `sep` placeholder option with a call to the `sep()` standard library function -warning[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` placeholder option +note[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` placeholder option ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:11:39 │ 11 │ String bad_true_false_option = "~{true="--enable-foo" false="" allow_foo}" @@ -14,7 +14,7 @@ warning[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` place │ = fix: replace the `true`/`false` placeholder option with an `if`/`else` expression -warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholder option +note[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholder option ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:12:36 │ 12 │ String bad_default_option = "~{default="false" bar}" @@ -22,7 +22,7 @@ warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholde │ = fix: replace the `default` placeholder option with a call to the `select_first()` standard library function -warning[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder option +note[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder option ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:15:28 │ 15 │ python script.py ~{sep=" " numbers} @@ -30,7 +30,7 @@ warning[DeprecatedPlaceholderOption]: use of the deprecated `sep` placeholder op │ = fix: replace the `sep` placeholder option with a call to the `sep()` standard library function -warning[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` placeholder option +note[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` placeholder option ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:16:27 │ 16 │ example-command ~{true="--enable-foo" false="" allow_foo} @@ -38,7 +38,7 @@ warning[DeprecatedPlaceholderOption]: use of the deprecated `true`/`false` place │ = fix: replace the `true`/`false` placeholder option with an `if`/`else` expression -warning[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholder option +note[DeprecatedPlaceholderOption]: use of the deprecated `default` placeholder option ┌─ tests/lints/deprecated-placeholder-options-v1.1/source.wdl:17:27 │ 17 │ another-command ~{default="foobar" bar} diff --git a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.wdl b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.wdl index ef171c40..d6d0f886 100644 --- a/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.wdl +++ b/wdl-lint/tests/lints/deprecated-placeholder-options-v1.1/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test of the `DeprecatedPlaceholderOption` lint. @@ -18,6 +18,7 @@ task a_failing_task { >>> output {} + runtime {} } @@ -37,6 +38,7 @@ task a_better_task { >>> output {} + runtime {} } @@ -55,5 +57,6 @@ task an_ignored_task { >>> output {} + runtime {} } diff --git a/wdl-lint/tests/lints/description-missing/source.errors b/wdl-lint/tests/lints/description-missing/source.errors index 22620e7d..4848114c 100644 --- a/wdl-lint/tests/lints/description-missing/source.errors +++ b/wdl-lint/tests/lints/description-missing/source.errors @@ -1,23 +1,23 @@ note[DescriptionMissing]: task `foo` is missing a description key - ┌─ tests/lints/description-missing/source.wdl:8:5 + ┌─ tests/lints/description-missing/source.wdl:7:5 │ -8 │ meta { +7 │ meta { │ ^^^^ │ = fix: add a `description` key to this meta section note[DescriptionMissing]: workflow `bar` is missing a description key - ┌─ tests/lints/description-missing/source.wdl:24:5 + ┌─ tests/lints/description-missing/source.wdl:20:5 │ -24 │ meta { +20 │ meta { │ ^^^^ │ = fix: add a `description` key to this meta section note[DescriptionMissing]: struct `Baz` is missing a description key - ┌─ tests/lints/description-missing/source.wdl:36:5 + ┌─ tests/lints/description-missing/source.wdl:30:5 │ -36 │ meta { +30 │ meta { │ ^^^^ │ = fix: add a `description` key to this meta section diff --git a/wdl-lint/tests/lints/description-missing/source.wdl b/wdl-lint/tests/lints/description-missing/source.wdl index 519b10e6..a74ed61d 100644 --- a/wdl-lint/tests/lints/description-missing/source.wdl +++ b/wdl-lint/tests/lints/description-missing/source.wdl @@ -1,32 +1,26 @@ -#@ except: BlankLinesBetweenElements, MissingRuntime, MissingOutput, MissingRequirements - ## This is a test for a missing description in a `meta` section. version 1.2 +#@ except: MissingRequirements task foo { meta { - } command <<<>>> output { - } runtime { - } } workflow bar { meta { - } output { - } } @@ -34,7 +28,6 @@ struct Baz { String x meta { - } parameter_meta { diff --git a/wdl-lint/tests/lints/disallowed-input-name/source.errors b/wdl-lint/tests/lints/disallowed-input-name/source.errors index b4815ea4..c7b2503d 100644 --- a/wdl-lint/tests/lints/disallowed-input-name/source.errors +++ b/wdl-lint/tests/lints/disallowed-input-name/source.errors @@ -1,31 +1,31 @@ note[DisallowedInputName]: declaration identifier must be at least 3 characters - ┌─ tests/lints/disallowed-input-name/source.wdl:20:14 + ┌─ tests/lints/disallowed-input-name/source.wdl:19:14 │ -20 │ File f # This is not OK +19 │ File f # This is not OK │ ^ │ = fix: rename the declaration to a name with at least 3 characters note[DisallowedInputName]: declaration identifier starts with 'in' - ┌─ tests/lints/disallowed-input-name/source.wdl:21:16 + ┌─ tests/lints/disallowed-input-name/source.wdl:20:16 │ -21 │ String inString # This is not OK +20 │ String inString # This is not OK │ ^^^^^^^^ │ = fix: rename the declaration to a name that does not start with 'in' note[DisallowedInputName]: declaration identifier starts with 'input' - ┌─ tests/lints/disallowed-input-name/source.wdl:22:16 + ┌─ tests/lints/disallowed-input-name/source.wdl:21:16 │ -22 │ String input_string # This is not OK +21 │ String input_string # This is not OK │ ^^^^^^^^^^^^ │ = fix: rename the declaration to a name that does not start with 'input' note[DisallowedInputName]: declaration identifier starts with 'in' - ┌─ tests/lints/disallowed-input-name/source.wdl:23:16 + ┌─ tests/lints/disallowed-input-name/source.wdl:22:16 │ -23 │ String in_string # This is not OK +22 │ String in_string # This is not OK │ ^^^^^^^^^ │ = fix: rename the declaration to a name that does not start with 'in' diff --git a/wdl-lint/tests/lints/disallowed-input-name/source.wdl b/wdl-lint/tests/lints/disallowed-input-name/source.wdl index 8407280d..8b2184db 100644 --- a/wdl-lint/tests/lints/disallowed-input-name/source.wdl +++ b/wdl-lint/tests/lints/disallowed-input-name/source.wdl @@ -1,7 +1,6 @@ -#@ except: MissingRequirements, SnakeCase - version 1.2 +#@ except: MissingRequirements, SnakeCase task foo { meta { description: "This is a test of disallowed input names" diff --git a/wdl-lint/tests/lints/disallowed-output-name/source.errors b/wdl-lint/tests/lints/disallowed-output-name/source.errors index 1b3128c9..dbb35220 100644 --- a/wdl-lint/tests/lints/disallowed-output-name/source.errors +++ b/wdl-lint/tests/lints/disallowed-output-name/source.errors @@ -1,31 +1,31 @@ note[DisallowedOutputName]: declaration identifier must be at least 3 characters - ┌─ tests/lints/disallowed-output-name/source.wdl:27:14 + ┌─ tests/lints/disallowed-output-name/source.wdl:26:14 │ -27 │ File f = "test.wdl" # This is not OK +26 │ File f = "test.wdl" # This is not OK │ ^ │ = fix: rename the declaration to a name with at least 3 characters note[DisallowedOutputName]: declaration identifier starts with 'out' - ┌─ tests/lints/disallowed-output-name/source.wdl:28:16 + ┌─ tests/lints/disallowed-output-name/source.wdl:27:16 │ -28 │ String outString = "string" # This is not OK +27 │ String outString = "string" # This is not OK │ ^^^^^^^^^ │ = fix: rename the declaration to a name that does not start with 'out' note[DisallowedOutputName]: declaration identifier starts with 'output' - ┌─ tests/lints/disallowed-output-name/source.wdl:29:16 + ┌─ tests/lints/disallowed-output-name/source.wdl:28:16 │ -29 │ String output_string = "string" # This is not OK +28 │ String output_string = "string" # This is not OK │ ^^^^^^^^^^^^^ │ = fix: rename the declaration to a name that does not start with 'output' note[DisallowedOutputName]: declaration identifier starts with 'out' - ┌─ tests/lints/disallowed-output-name/source.wdl:30:16 + ┌─ tests/lints/disallowed-output-name/source.wdl:29:16 │ -30 │ String out_string = "string" # This is not OK +29 │ String out_string = "string" # This is not OK │ ^^^^^^^^^^ │ = fix: rename the declaration to a name that does not start with 'out' diff --git a/wdl-lint/tests/lints/disallowed-output-name/source.wdl b/wdl-lint/tests/lints/disallowed-output-name/source.wdl index f6fef61a..f2f7f097 100644 --- a/wdl-lint/tests/lints/disallowed-output-name/source.wdl +++ b/wdl-lint/tests/lints/disallowed-output-name/source.wdl @@ -1,7 +1,6 @@ -#@ except: MissingRequirements, SnakeCase - version 1.2 +#@ except: MissingRequirements, SnakeCase task foo { meta { description: "This is a test of disallowed output names" diff --git a/wdl-lint/tests/lints/double-quotes/source.errors b/wdl-lint/tests/lints/double-quotes/source.errors index cb4eb7a8..93a73af6 100644 --- a/wdl-lint/tests/lints/double-quotes/source.errors +++ b/wdl-lint/tests/lints/double-quotes/source.errors @@ -1,27 +1,27 @@ -warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/double-quotes/source.wdl:11:18 +note[DoubleQuotes]: string defined with single quotes + ┌─ tests/lints/double-quotes/source.wdl:10:18 │ -11 │ String bad = 'this string is not okay' +10 │ String bad = 'this string is not okay' │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: change the single quotes to double quotes -warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/double-quotes/source.wdl:14:13 +note[DoubleQuotes]: string defined with single quotes + ┌─ tests/lints/double-quotes/source.wdl:13:13 │ -14 │ ╭ 'but this is not and ~{ -15 │ │ "while this one is okay ~{ -16 │ │ 'this one is not' -17 │ │ }" -18 │ │ }' +13 │ ╭ 'but this is not and ~{ +14 │ │ "while this one is okay ~{ +15 │ │ 'this one is not' +16 │ │ }" +17 │ │ }' │ ╰──────────────^ │ = fix: change the single quotes to double quotes -warning[DoubleQuotes]: string defined with single quotes - ┌─ tests/lints/double-quotes/source.wdl:16:21 +note[DoubleQuotes]: string defined with single quotes + ┌─ tests/lints/double-quotes/source.wdl:15:21 │ -16 │ 'this one is not' +15 │ 'this one is not' │ ^^^^^^^^^^^^^^^^^ │ = fix: change the single quotes to double quotes diff --git a/wdl-lint/tests/lints/double-quotes/source.wdl b/wdl-lint/tests/lints/double-quotes/source.wdl index 6f152b67..0c94c867 100644 --- a/wdl-lint/tests/lints/double-quotes/source.wdl +++ b/wdl-lint/tests/lints/double-quotes/source.wdl @@ -1,15 +1,14 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing - ## This is a test of the `DoubleQuotes` lint version 1.1 workflow test { + #@ except: DescriptionMissing meta {} String good = "this string is okay" String bad = 'this string is not okay' - String interpolated = # a comment! + String interpolated = # a comment! "this string is ok ~{ 'but this is not and ~{ "while this one is okay ~{ @@ -20,5 +19,6 @@ workflow test { #@ except: DoubleQuotes String excepted = 'this string is excepted' + output {} } diff --git a/wdl-lint/tests/lints/except/source.errors b/wdl-lint/tests/lints/except/source.errors index d523ae68..e6081d5e 100644 --- a/wdl-lint/tests/lints/except/source.errors +++ b/wdl-lint/tests/lints/except/source.errors @@ -22,7 +22,7 @@ warning[SnakeCase]: struct member name `NotOk` is not snake_case │ = fix: replace `NotOk` with `not_ok` -warning[DoubleQuotes]: string defined with single quotes +note[DoubleQuotes]: string defined with single quotes ┌─ tests/lints/except/source.wdl:29:18 │ 29 │ String bad = 'bad string' # NOT OK diff --git a/wdl-lint/tests/lints/except/source.wdl b/wdl-lint/tests/lints/except/source.wdl index 5f78f9fb..ff9b6783 100644 --- a/wdl-lint/tests/lints/except/source.wdl +++ b/wdl-lint/tests/lints/except/source.wdl @@ -27,8 +27,8 @@ struct Ok { # OK #@ except: MissingMetas,MissingOutput,Whitespace workflow test { String bad = 'bad string' # NOT OK - #@ except: DoubleQuotes String good = + #@ except: DoubleQuotes 'good string' # OK } diff --git a/wdl-lint/tests/lints/expression-spacing/source.errors b/wdl-lint/tests/lints/expression-spacing/source.errors index 3d906643..7b61ec88 100644 --- a/wdl-lint/tests/lints/expression-spacing/source.errors +++ b/wdl-lint/tests/lints/expression-spacing/source.errors @@ -1,167 +1,183 @@ note[ExpressionSpacing]: assignments must be surrounded by whitespace - ┌─ tests/lints/expression-spacing/source.wdl:11:14 + ┌─ tests/lints/expression-spacing/source.wdl:14:14 │ -11 │ Int a=- 1 +14 │ Int a=- 1 │ ^ │ = fix: add a space before and after this assignment note[ExpressionSpacing]: prefix operators may not contain whitespace - ┌─ tests/lints/expression-spacing/source.wdl:11:15 + ┌─ tests/lints/expression-spacing/source.wdl:14:15 │ -11 │ Int a=- 1 +14 │ Int a=- 1 │ ^^^ │ = fix: remove the internal whitespace note[ExpressionSpacing]: operators must be followed by whitespace - ┌─ tests/lints/expression-spacing/source.wdl:18:31 + ┌─ tests/lints/expression-spacing/source.wdl:21:31 │ -18 │ Int complex_value = w -x +( y* ( z /(f %b) )) +21 │ Int complex_value = w -x +( y* ( z /(f %b) )) │ ^ │ = fix: add a space after this operator note[ExpressionSpacing]: operators must be followed by whitespace - ┌─ tests/lints/expression-spacing/source.wdl:18:34 + ┌─ tests/lints/expression-spacing/source.wdl:21:34 │ -18 │ Int complex_value = w -x +( y* ( z /(f %b) )) +21 │ Int complex_value = w -x +( y* ( z /(f %b) )) │ ^ │ = fix: add a space after this operator note[ExpressionSpacing]: this space is not allowed - ┌─ tests/lints/expression-spacing/source.wdl:18:36 + ┌─ tests/lints/expression-spacing/source.wdl:21:36 │ -18 │ Int complex_value = w -x +( y* ( z /(f %b) )) +21 │ Int complex_value = w -x +( y* ( z /(f %b) )) │ ^ │ = fix: remove the space note[ExpressionSpacing]: operators must be preceded by whitespace - ┌─ tests/lints/expression-spacing/source.wdl:18:38 + ┌─ tests/lints/expression-spacing/source.wdl:21:38 │ -18 │ Int complex_value = w -x +( y* ( z /(f %b) )) +21 │ Int complex_value = w -x +( y* ( z /(f %b) )) │ ^ │ = fix: add a space before this operator note[ExpressionSpacing]: this space is not allowed - ┌─ tests/lints/expression-spacing/source.wdl:18:41 + ┌─ tests/lints/expression-spacing/source.wdl:21:41 │ -18 │ Int complex_value = w -x +( y* ( z /(f %b) )) +21 │ Int complex_value = w -x +( y* ( z /(f %b) )) │ ^ │ = fix: remove the space note[ExpressionSpacing]: operators must be followed by whitespace - ┌─ tests/lints/expression-spacing/source.wdl:18:44 + ┌─ tests/lints/expression-spacing/source.wdl:21:44 │ -18 │ Int complex_value = w -x +( y* ( z /(f %b) )) +21 │ Int complex_value = w -x +( y* ( z /(f %b) )) │ ^ │ = fix: add a space after this operator note[ExpressionSpacing]: operators must be followed by whitespace - ┌─ tests/lints/expression-spacing/source.wdl:18:48 + ┌─ tests/lints/expression-spacing/source.wdl:21:48 │ -18 │ Int complex_value = w -x +( y* ( z /(f %b) )) +21 │ Int complex_value = w -x +( y* ( z /(f %b) )) │ ^ │ = fix: add a space after this operator note[ExpressionSpacing]: this space is not allowed - ┌─ tests/lints/expression-spacing/source.wdl:18:51 + ┌─ tests/lints/expression-spacing/source.wdl:21:51 │ -18 │ Int complex_value = w -x +( y* ( z /(f %b) )) +21 │ Int complex_value = w -x +( y* ( z /(f %b) )) │ ^ │ = fix: remove the space note[ExpressionSpacing]: operators must be followed by whitespace - ┌─ tests/lints/expression-spacing/source.wdl:40:29 + ┌─ tests/lints/expression-spacing/source.wdl:43:29 │ -40 │ ||!e +43 │ ||!e │ ^^ │ = fix: add a space after this operator note[ExpressionSpacing]: multi-line if...then...else must have a preceding parenthesis and newline - ┌─ tests/lints/expression-spacing/source.wdl:56:21 + ┌─ tests/lints/expression-spacing/source.wdl:59:21 │ -56 │ Boolean v = if +59 │ Boolean v = if │ ^^ │ = fix: add a open parenthesis and newline prior to this if note[ExpressionSpacing]: multi-line if...then...else must have a preceding space - ┌─ tests/lints/expression-spacing/source.wdl:57:15 + ┌─ tests/lints/expression-spacing/source.wdl:60:15 │ -57 │ a < b then true +60 │ a < b then true │ ^^^^ │ = fix: add a newline before the then keyword note[ExpressionSpacing]: multi-line if...then...else must have a following newline and parenthesis - ┌─ tests/lints/expression-spacing/source.wdl:58:9 + ┌─ tests/lints/expression-spacing/source.wdl:61:9 │ -58 │ else false +61 │ else false │ ^^^^ │ = fix: add a newline and close parenthesis after to this else clause note[ExpressionSpacing]: multi-line if...then...else must have a preceding space - ┌─ tests/lints/expression-spacing/source.wdl:63:22 + ┌─ tests/lints/expression-spacing/source.wdl:66:22 │ -63 │ if a < b then true +66 │ if a < b then true │ ^^^^ │ = fix: add a newline before the then keyword note[ExpressionSpacing]: multi-line if...then...else must have a preceding space - ┌─ tests/lints/expression-spacing/source.wdl:68:22 + ┌─ tests/lints/expression-spacing/source.wdl:71:22 │ -68 │ if a < b then true +71 │ if a < b then true │ ^^^^ │ = fix: add a newline before the then keyword note[ExpressionSpacing]: multi-line array/map/object literals must have a newline following the opening token - ┌─ tests/lints/expression-spacing/source.wdl:78:21 + ┌─ tests/lints/expression-spacing/source.wdl:81:21 │ -78 │ Boolean i = [1 +81 │ Boolean i = [1 │ ^ │ = fix: add a newline after this token note[ExpressionSpacing]: multi-line array/map/object literals must have a newline preceding the closing token - ┌─ tests/lints/expression-spacing/source.wdl:80:17 + ┌─ tests/lints/expression-spacing/source.wdl:83:18 │ -80 │ ,2,3] == [1,2,4] - │ ^ +83 │ ,2,3,] == [1,2,4] + │ ^ │ = fix: add a newline before this token +note[CommentWhitespace]: comment not sufficiently indented + ┌─ tests/lints/expression-spacing/source.wdl:104:13 + │ +104 │ # This comment will flag, because the `] == [` expression is incorrect. + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: this comment has 3 levels of indentation. It should have 4 levels of indentation. + +note[CommentWhitespace]: comment not sufficiently indented + ┌─ tests/lints/expression-spacing/source.wdl:138:13 + │ +138 │ # This comment will flag, because the `} == {` expression is incorrect. + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: this comment has 3 levels of indentation. It should have 4 levels of indentation. + note[ExpressionSpacing]: multi-line array/map/object literals must have a newline following the opening token - ┌─ tests/lints/expression-spacing/source.wdl:146:24 + ┌─ tests/lints/expression-spacing/source.wdl:149:24 │ -146 │ Array[Int] p = [1, +149 │ Array[Int] p = [1, │ ^ │ = fix: add a newline after this token note[ExpressionSpacing]: multi-line array/map/object literals must have a newline preceding the closing token - ┌─ tests/lints/expression-spacing/source.wdl:147:12 + ┌─ tests/lints/expression-spacing/source.wdl:150:13 │ -147 │ 2,3] - │ ^ +150 │ 2,3,] + │ ^ │ = fix: add a newline before this token note[ExpressionSpacing]: prefix operators may not contain whitespace - ┌─ tests/lints/expression-spacing/source.wdl:153:21 + ┌─ tests/lints/expression-spacing/source.wdl:157:21 │ -153 │ Boolean b = ! a +157 │ Boolean b = ! a │ ^^^ │ = fix: remove the internal whitespace diff --git a/wdl-lint/tests/lints/expression-spacing/source.wdl b/wdl-lint/tests/lints/expression-spacing/source.wdl index 6dd26b40..28f3a539 100644 --- a/wdl-lint/tests/lints/expression-spacing/source.wdl +++ b/wdl-lint/tests/lints/expression-spacing/source.wdl @@ -1,12 +1,15 @@ -#@ except: CommentWhitespace, DescriptionMissing, DisallowedInputName, DisallowedOutputName, InputSorting, LineWidth, MatchingParameterMeta, NonmatchingOutput, RuntimeSectionKeys, TrailingComma, Whitespace +#@ except: InputSorting, MatchingParameterMeta, NonmatchingOutput, RuntimeSectionKeys +#@ except: Whitespace version 1.1 task foo { + #@ except: DescriptionMissing meta {} parameter_meta{} + #@ except: DisallowedInputName input { Int a=- 1 Int w = 1 @@ -77,7 +80,7 @@ task foo { Boolean h = [1,2,3] == [1,2,3] Boolean i = [1 # a comment - ,2,3] == [1,2,4] + ,2,3,] == [1,2,4] Boolean j = [ 1, 2, @@ -107,7 +110,7 @@ task foo { Boolean l = { # comment "a": 1, - "b": 2 + "b": 2, } == { "b": 2, "a": 1, @@ -116,7 +119,7 @@ task foo { Boolean m = { # comment "a": 1, - "b": 2 + "b": 2, } == { "b": 2, @@ -126,7 +129,7 @@ task foo { Boolean n = { # comment "a": 1, - "b": 2 + "b": 2, } == { @@ -137,18 +140,19 @@ task foo { Boolean o = { # comment "a": 1, - "b": 2 + "b": 2, } == { "b": 2, "a": 1, # This comment is OK. } Array[Int] p = [1, - 2,3] + 2,3,] } command <<< >>> + #@ except: DisallowedOutputName output { Boolean b = ! a } diff --git a/wdl-lint/tests/lints/import-placements/source.errors b/wdl-lint/tests/lints/import-placements/source.errors index 493fdaa8..0bad9994 100644 --- a/wdl-lint/tests/lints/import-placements/source.errors +++ b/wdl-lint/tests/lints/import-placements/source.errors @@ -1,7 +1,7 @@ warning[ImportPlacement]: misplaced import ┌─ tests/lints/import-placements/source.wdl:16:1 │ -16 │ import "jam.wdl" # BAD +16 │ import "jam.wdl" # BAD │ ^^^^^^^^^^^^^^^^ │ = fix: move this import so that it comes after the version statement but before any document items @@ -9,7 +9,7 @@ warning[ImportPlacement]: misplaced import warning[ImportPlacement]: misplaced import ┌─ tests/lints/import-placements/source.wdl:17:1 │ -17 │ import "qux.wdl" # BAD +17 │ import "qux.wdl" # BAD │ ^^^^^^^^^^^^^^^^ │ = fix: move this import so that it comes after the version statement but before any document items diff --git a/wdl-lint/tests/lints/import-placements/source.wdl b/wdl-lint/tests/lints/import-placements/source.wdl index 07b59bac..150b6c1f 100644 --- a/wdl-lint/tests/lints/import-placements/source.wdl +++ b/wdl-lint/tests/lints/import-placements/source.wdl @@ -1,17 +1,17 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing - ## This is a test of import placements. version 1.1 -import "bar.wdl" # OK -import "baz.wdl" # OK -import "foo.wdl" # OK +import "bar.wdl" # OK +import "baz.wdl" # OK +import "foo.wdl" # OK workflow test { + #@ except: DescriptionMissing meta {} + output {} } -import "jam.wdl" # BAD -import "qux.wdl" # BAD +import "jam.wdl" # BAD +import "qux.wdl" # BAD diff --git a/wdl-lint/tests/lints/inconsistent-newlines/source.errors b/wdl-lint/tests/lints/inconsistent-newlines/source.errors index 61dff7a4..5c242b27 100644 --- a/wdl-lint/tests/lints/inconsistent-newlines/source.errors +++ b/wdl-lint/tests/lints/inconsistent-newlines/source.errors @@ -1,8 +1,10 @@ -note[UnknownRule]: unknown lint rule `PreambleWhitespace` - ┌─ tests/lints/inconsistent-newlines/source.wdl:1:26 - │ -1 │ #@ except: EndingNewline,PreambleWhitespace,MissingMetas,MissingOutput - │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule - │ - = fix: remove the rule from the exception list +note[InconsistentNewlines]: inconsistent newlines detected + ┌─ tests/lints/inconsistent-newlines/source.wdl:5:12 + │ +5 │ version 1.1 + │ ╭───────────^ +6 │ │ + │ ╰^ the first occurrence of a mismatched newline is here + │ + = fix: use either "/n" or "/r/n" consistently in the file diff --git a/wdl-lint/tests/lints/inconsistent-newlines/source.wdl b/wdl-lint/tests/lints/inconsistent-newlines/source.wdl index 917ea368..d7037e91 100644 --- a/wdl-lint/tests/lints/inconsistent-newlines/source.wdl +++ b/wdl-lint/tests/lints/inconsistent-newlines/source.wdl @@ -1,11 +1,8 @@ -#@ except: EndingNewline,PreambleWhitespace,MissingMetas,MissingOutput - ## This is a test of the `InconsistentNewlines` lint ## Note that due an inexact path separator replacement in the tests, ## error messages in the baseline will show `/` instead of `\`. -version 1.1 - -workflow foo {} - - +version 1.1 + +#@ except: MissingMetas,MissingOutput +workflow foo {} diff --git a/wdl-lint/tests/lints/input-not-sorted/source.errors b/wdl-lint/tests/lints/input-not-sorted/source.errors index f621e853..7191bb41 100644 --- a/wdl-lint/tests/lints/input-not-sorted/source.errors +++ b/wdl-lint/tests/lints/input-not-sorted/source.errors @@ -1,13 +1,13 @@ -warning[InputSorting]: input not sorted - ┌─ tests/lints/input-not-sorted/source.wdl:40:5 +note[InputSorting]: input not sorted + ┌─ tests/lints/input-not-sorted/source.wdl:42:5 │ -40 │ ╭ input { -41 │ │ String g = "hello" -42 │ │ Int? f = 2 -43 │ │ Int? e +42 │ ╭ input { +43 │ │ String g = "hello" +44 │ │ Int? f = 2 +45 │ │ Int? e · │ -64 │ │ mystruct u -65 │ │ } +67 │ │ mystruct u +68 │ │ } │ ╰─────^ input section must be sorted │ = fix: sort input statements as: @@ -36,16 +36,16 @@ warning[InputSorting]: input not sorted Int? f = 2 String g = "hello" -warning[InputSorting]: input not sorted - ┌─ tests/lints/input-not-sorted/source.wdl:95:5 +note[InputSorting]: input not sorted + ┌─ tests/lints/input-not-sorted/source.wdl:102:5 │ - 95 │ ╭ input { - 96 │ │ String g = "hello" - 97 │ │ Int? f = 2 - 98 │ │ Int? e +102 │ ╭ input { +103 │ │ String g = "hello" +104 │ │ Int? f = 2 +105 │ │ Int? e · │ -117 │ │ Array[String]+ p -118 │ │ } +124 │ │ Array[String]+ p +125 │ │ } │ ╰─────^ input section must be sorted │ = fix: sort input statements as: diff --git a/wdl-lint/tests/lints/input-not-sorted/source.wdl b/wdl-lint/tests/lints/input-not-sorted/source.wdl index 0e2d85f9..4ac7f7d8 100644 --- a/wdl-lint/tests/lints/input-not-sorted/source.wdl +++ b/wdl-lint/tests/lints/input-not-sorted/source.wdl @@ -1,5 +1,5 @@ -#@ except: BlankLinesBetweenElements, DeprecatedObject, DescriptionMissing -#@ except: DisallowedInputName, MissingRequirements, SectionOrdering, RuntimeSectionKeys +#@ except: DescriptionMissing, DisallowedInputName, MissingRequirements +#@ except: RuntimeSectionKeys version 1.2 @@ -11,6 +11,7 @@ struct Mystruct { workflow foo { meta {} + parameter_meta { a: "" b: "" @@ -37,6 +38,7 @@ workflow foo { w: "" x: "" } + input { String g = "hello" Int? f = 2 @@ -51,6 +53,7 @@ workflow foo { Pair[File, Int] j Array[Int]? d Array[String] q + #@ except: DeprecatedObject Object v Map[String, Int]? k Map[String, Array[Int]]? l @@ -63,11 +66,14 @@ workflow foo { Array[String]+ p mystruct u } + output {} } +#@ except: SectionOrdering task bar { meta {} + parameter_meta { a: "" b: "" @@ -92,6 +98,7 @@ task bar { w: "" x: "" } + input { String g = "hello" Int? f = 2 @@ -116,8 +123,11 @@ task bar { Pair[String, File] n Array[String]+ p } + command <<< >>> + runtime {} + output {} } diff --git a/wdl-lint/tests/lints/input-spacing/source.errors b/wdl-lint/tests/lints/input-spacing/source.errors index 5f74e737..54612b8f 100644 --- a/wdl-lint/tests/lints/input-spacing/source.errors +++ b/wdl-lint/tests/lints/input-spacing/source.errors @@ -40,6 +40,14 @@ note[CallInputSpacing]: call inputs must be separated by newline │ = fix: add newline before the input +note[TrailingComma]: item missing trailing comma + ┌─ tests/lints/input-spacing/source.wdl:20:24 + │ +20 │ a="something", b="somethingelse" + │ ^^^^^^^^^^^^^^^^^ + │ + = fix: add a comma after this element + note[CallInputSpacing]: call inputs assignments must be surrounded with whitespace ┌─ tests/lints/input-spacing/source.wdl:20:25 │ diff --git a/wdl-lint/tests/lints/input-spacing/source.wdl b/wdl-lint/tests/lints/input-spacing/source.wdl index 8d3d8106..45de3f93 100644 --- a/wdl-lint/tests/lints/input-spacing/source.wdl +++ b/wdl-lint/tests/lints/input-spacing/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, DisallowedInputName, LineWidth, SectionOrdering, RuntimeSectionKeys, TrailingComma +#@ except: DescriptionMissing, DisallowedInputName, RuntimeSectionKeys version 1.1 @@ -21,21 +21,27 @@ workflow foo { } call bar as ba3 { input: a = "something"} + output {} } task bar { meta {} + parameter_meta { a: "" b: "" } + input { String a String? b } + command <<< >>> - runtime {} + output {} + + runtime {} } diff --git a/wdl-lint/tests/lints/invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/invalid-preamble-comment/source.errors index 68cfc4aa..7cc593a1 100644 --- a/wdl-lint/tests/lints/invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/invalid-preamble-comment/source.errors @@ -1,12 +1,13 @@ note[PreambleFormatting]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/invalid-preamble-comment/source.wdl:3:1 + ┌─ tests/lints/invalid-preamble-comment/source.wdl:1:1 │ -3 │ # This is an invalid preamble comment. +1 │ # This is an invalid preamble comment. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note[PreambleFormatting]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/invalid-preamble-comment/source.wdl:5:1 - │ -5 │ # This one is invalid too! - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ + ┌─ tests/lints/invalid-preamble-comment/source.wdl:3:1 + │ +3 │ ╭ # This one is invalid too! +4 │ │ ### This one is invalid too! + │ ╰────────────────────────────^ diff --git a/wdl-lint/tests/lints/invalid-preamble-comment/source.wdl b/wdl-lint/tests/lints/invalid-preamble-comment/source.wdl index 4a5e74ef..a9c57c60 100644 --- a/wdl-lint/tests/lints/invalid-preamble-comment/source.wdl +++ b/wdl-lint/tests/lints/invalid-preamble-comment/source.wdl @@ -1,13 +1,15 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - # This is an invalid preamble comment. ## This one is fine # This one is invalid too! +### This one is invalid too! version 1.1 workflow test { + #@ except: DescriptionMissing meta {} + parameter_meta {} + output {} } diff --git a/wdl-lint/tests/lints/key-value-pairs/source.errors b/wdl-lint/tests/lints/key-value-pairs/source.errors index 8038c548..23f9dbd2 100644 --- a/wdl-lint/tests/lints/key-value-pairs/source.errors +++ b/wdl-lint/tests/lints/key-value-pairs/source.errors @@ -32,6 +32,14 @@ note[KeyValuePairs]: item should be followed by a newline │ = fix: add a newline after this element +note[TrailingComma]: item missing trailing comma + ┌─ tests/lints/key-value-pairs/source.wdl:9:19 + │ +9 │ "value2", "value3"] + │ ^^^^^^^^ + │ + = fix: add a comma after this element + note[KeyValuePairs]: item should be followed by a newline ┌─ tests/lints/key-value-pairs/source.wdl:10:19 │ @@ -96,6 +104,14 @@ note[KeyValuePairs]: item should be followed by a newline │ = fix: add a newline after this element +note[TrailingComma]: item missing trailing comma + ┌─ tests/lints/key-value-pairs/source.wdl:20:22 + │ +20 │ "m", "n"], + │ ^^^ + │ + = fix: add a comma after this element + note[KeyValuePairs]: item should be followed by a newline ┌─ tests/lints/key-value-pairs/source.wdl:21:16 │ @@ -112,6 +128,14 @@ note[KeyValuePairs]: incorrect indentation │ = fix: add 4 spaces to indentation +note[TrailingComma]: item missing trailing comma + ┌─ tests/lints/key-value-pairs/source.wdl:34:13 + │ +34 │ choices: ["yes", "reverse", "no"] + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: add a comma after this element + note[KeyValuePairs]: all items in an array or object should be on separate lines ┌─ tests/lints/key-value-pairs/source.wdl:34:22 │ diff --git a/wdl-lint/tests/lints/key-value-pairs/source.wdl b/wdl-lint/tests/lints/key-value-pairs/source.wdl index a7d75859..a39df73b 100644 --- a/wdl-lint/tests/lints/key-value-pairs/source.wdl +++ b/wdl-lint/tests/lints/key-value-pairs/source.wdl @@ -1,4 +1,4 @@ -#@ except: MatchingParameterMeta, MissingRequirements, TrailingComma +#@ except: MatchingParameterMeta, MissingRequirements version 1.2 diff --git a/wdl-lint/tests/lints/line-width/source.errors b/wdl-lint/tests/lints/line-width/source.errors index 3b77fdec..3d73fbf5 100755 --- a/wdl-lint/tests/lints/line-width/source.errors +++ b/wdl-lint/tests/lints/line-width/source.errors @@ -1,31 +1,31 @@ note[LineWidth]: line exceeds maximum width of 90 - ┌─ tests/lints/line-width/source.wdl:12:1 + ┌─ tests/lints/line-width/source.wdl:14:1 │ -12 │ this is going to be a really long line that is almost certainly going to be longer than the maximum line length I would hope / +14 │ this is going to be a really long line that is almost certainly going to be longer than the maximum line length I would hope / │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: split the line into multiple lines note[LineWidth]: line exceeds maximum width of 90 - ┌─ tests/lints/line-width/source.wdl:14:1 + ┌─ tests/lints/line-width/source.wdl:16:1 │ -14 │ this line is also going to be very very very long just to trip up our maximum line lint / +16 │ this line is also going to be very very very long just to trip up our maximum line lint / │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: split the line into multiple lines note[LineWidth]: line exceeds maximum width of 90 - ┌─ tests/lints/line-width/source.wdl:49:1 + ┌─ tests/lints/line-width/source.wdl:55:1 │ -49 │ command <<< this is a task that has a very very very long command section on the first line. >>> +55 │ command <<< this is a task that has a very very very long command section on the first line. >>> │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: split the line into multiple lines note[LineWidth]: line exceeds maximum width of 90 - ┌─ tests/lints/line-width/source.wdl:55:1 + ┌─ tests/lints/line-width/source.wdl:62:1 │ -55 │ # Here is a very very very very very very very very very long comment that should absolutely eclipse 90 characters. +62 │ # Here is a very very very very very very very very very long comment that should absolutely eclipse 90 characters. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: split the line into multiple lines diff --git a/wdl-lint/tests/lints/line-width/source.wdl b/wdl-lint/tests/lints/line-width/source.wdl index 0b0e13ff..5b5b9a37 100644 --- a/wdl-lint/tests/lints/line-width/source.wdl +++ b/wdl-lint/tests/lints/line-width/source.wdl @@ -1,10 +1,12 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, RuntimeSectionKeys +#@ except: DescriptionMissing, RuntimeSectionKeys version 1.1 task task_a { meta {} + parameter_meta {} + input {} command <<< @@ -17,16 +19,17 @@ task task_a { >>> output {} + runtime {} } task task_b { meta {} + parameter_meta {} + input {} - # This except currently causes the entire command block to fail. - # That will be fixed in the future when we fix how excepting works. #@ except: LineWidth command <<< bin \ @@ -38,17 +41,21 @@ task task_b { >>> output {} + runtime {} } task task_c { meta {} + parameter_meta {} + input {} command <<< this is a task that has a very very very long command section on the first line. >>> output {} + runtime {} } diff --git a/wdl-lint/tests/lints/matching-param-meta/source.errors b/wdl-lint/tests/lints/matching-param-meta/source.errors index 78349757..751a48e3 100644 --- a/wdl-lint/tests/lints/matching-param-meta/source.errors +++ b/wdl-lint/tests/lints/matching-param-meta/source.errors @@ -1,32 +1,32 @@ -warning[MatchingParameterMeta]: task `t` is missing a parameter metadata key for input `does_not_exist` - ┌─ tests/lints/matching-param-meta/source.wdl:12:16 - │ -12 │ String does_not_exist - │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section - │ - = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. - note[MatchingParameterMeta]: task `t` has an extraneous parameter metadata key named `extra` - ┌─ tests/lints/matching-param-meta/source.wdl:24:9 + ┌─ tests/lints/matching-param-meta/source.wdl:20:9 │ -24 │ extra: "this should not be here" +20 │ extra: "this should not be here" │ ^^^^^ this key does not correspond to any input declaration │ = fix: remove the extraneous parameter metadata entry -warning[MatchingParameterMeta]: workflow `w` is missing a parameter metadata key for input `does_not_exist` - ┌─ tests/lints/matching-param-meta/source.wdl:37:16 +warning[MatchingParameterMeta]: task `t` is missing a parameter metadata key for input `does_not_exist` + ┌─ tests/lints/matching-param-meta/source.wdl:25:16 │ -37 │ String does_not_exist +25 │ String does_not_exist │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section │ = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. note[MatchingParameterMeta]: workflow `w` has an extraneous parameter metadata key named `extra` - ┌─ tests/lints/matching-param-meta/source.wdl:49:9 + ┌─ tests/lints/matching-param-meta/source.wdl:47:9 │ -49 │ extra: "this should not be here" +47 │ extra: "this should not be here" │ ^^^^^ this key does not correspond to any input declaration │ = fix: remove the extraneous parameter metadata entry +warning[MatchingParameterMeta]: workflow `w` is missing a parameter metadata key for input `does_not_exist` + ┌─ tests/lints/matching-param-meta/source.wdl:52:16 + │ +52 │ String does_not_exist + │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section + │ + = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. + diff --git a/wdl-lint/tests/lints/matching-param-meta/source.wdl b/wdl-lint/tests/lints/matching-param-meta/source.wdl index 8ce14fc1..78222231 100644 --- a/wdl-lint/tests/lints/matching-param-meta/source.wdl +++ b/wdl-lint/tests/lints/matching-param-meta/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, RuntimeSectionKeys, SectionOrdering, TrailingComma +#@ except: DescriptionMissing, RuntimeSectionKeys ## This is a test for checking for missing and extraneous entries ## in a `parameter_meta` section. @@ -7,10 +7,6 @@ version 1.1 task t { meta {} - input { - String matching - String does_not_exist - } parameter_meta { matching: { @@ -18,24 +14,26 @@ task t { foo: { bar: { does_not_exist: "this should not suppress a missing input lint" - } - } + }, + }, } extra: "this should not be here" } - runtime {} + input { + String matching + String does_not_exist + } + command <<<>>> + output {} + + runtime {} } workflow w { meta {} - output {} - input { - String matching - String does_not_exist - } parameter_meta { matching: { @@ -43,9 +41,16 @@ workflow w { foo: { bar: { does_not_exist: "this should not suppress a missing input lint" - } - } + }, + }, } extra: "this should not be here" } + + input { + String matching + String does_not_exist + } + + output {} } diff --git a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors index 3f7cae31..ae43b875 100644 --- a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors +++ b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors @@ -1,8 +1,18 @@ note[VersionFormatting]: expected exactly one blank line after the version statement - ┌─ tests/lints/missing-blank-line-after-version/source.wdl:5:12 + ┌─ tests/lints/missing-blank-line-after-version/source.wdl:7:12 │ -5 │ version 1.1 +7 │ version 1.1 │ ╭───────────^ -6 │ │ workflow test { +8 │ │ workflow test { │ ╰^ +note[BlankLinesBetweenElements]: missing blank line + ┌─ tests/lints/missing-blank-line-after-version/source.wdl:8:1 + │ + 8 │ ╭ workflow test { + 9 │ │ meta {} +10 │ │ +11 │ │ output {} +12 │ │ } + │ ╰─^ + diff --git a/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl b/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl index 57f5345c..782f6b50 100644 --- a/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl +++ b/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl @@ -1,9 +1,12 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing +#@ except: DescriptionMissing, Todo ## This is a test of a missing blank line following the version statement. +## TODO: this emits two errors, one from VersionFormatting and one from +## BlankLinesBetweenElements. Only one of the errors is expected. version 1.1 workflow test { meta {} + output {} } diff --git a/wdl-lint/tests/lints/missing-comment-space/source.errors b/wdl-lint/tests/lints/missing-comment-space/source.errors index 6aeebb3d..d3a0a87c 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.errors +++ b/wdl-lint/tests/lints/missing-comment-space/source.errors @@ -1,13 +1,21 @@ +note[CommentWhitespace]: comment delimiter should be followed by a single space + ┌─ tests/lints/missing-comment-space/source.wdl:1:1 + │ +1 │ ##This preamble comment is missing a space. + │ ^^ + │ + = fix: follow this comment delimiter with a single space + note[PreambleFormatting]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/missing-comment-space/source.wdl:3:1 + ┌─ tests/lints/missing-comment-space/source.wdl:1:1 │ -3 │ ##This preamble comment is missing a space. +1 │ ##This preamble comment is missing a space. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/missing-comment-space/source.wdl:4:3 + ┌─ tests/lints/missing-comment-space/source.wdl:2:3 │ -4 │ ## +2 │ ## │ ^ │ = fix: remove this trailing whitespace diff --git a/wdl-lint/tests/lints/missing-comment-space/source.wdl b/wdl-lint/tests/lints/missing-comment-space/source.wdl index 6be12bbb..72cfc01d 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.wdl +++ b/wdl-lint/tests/lints/missing-comment-space/source.wdl @@ -1,5 +1,3 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing - ##This preamble comment is missing a space. ## ## But this one isn't and neither are the empty ones @@ -8,6 +6,8 @@ version 1.1 workflow test { + #@ except: DescriptionMissing meta {} + output {} } diff --git a/wdl-lint/tests/lints/missing-eof-newline/source.errors b/wdl-lint/tests/lints/missing-eof-newline/source.errors index b75df4b4..ec3aec42 100644 --- a/wdl-lint/tests/lints/missing-eof-newline/source.errors +++ b/wdl-lint/tests/lints/missing-eof-newline/source.errors @@ -1,4 +1,4 @@ -warning[EndingNewline]: missing newline at the end of the file +note[EndingNewline]: missing newline at the end of the file ┌─ tests/lints/missing-eof-newline/source.wdl:10:1 │ 10 │ } diff --git a/wdl-lint/tests/lints/missing-requirements-block/source.errors b/wdl-lint/tests/lints/missing-requirements-block/source.errors index d85900de..26bd3410 100644 --- a/wdl-lint/tests/lints/missing-requirements-block/source.errors +++ b/wdl-lint/tests/lints/missing-requirements-block/source.errors @@ -14,7 +14,7 @@ warning[MissingRequirements]: task `deprecated_runtime` is missing a `requiremen │ = fix: add a `requirements` section to the task -warning[MissingRequirements]: task `deprecated_runtime` contains a deprecated `runtime` section +note[MissingRequirements]: task `deprecated_runtime` contains a deprecated `runtime` section ┌─ tests/lints/missing-requirements-block/source.wdl:27:5 │ 27 │ ╭ runtime { diff --git a/wdl-lint/tests/lints/multiple-eof-newline/source.errors b/wdl-lint/tests/lints/multiple-eof-newline/source.errors index 65b13295..553d1a30 100644 --- a/wdl-lint/tests/lints/multiple-eof-newline/source.errors +++ b/wdl-lint/tests/lints/multiple-eof-newline/source.errors @@ -1,4 +1,4 @@ -warning[EndingNewline]: multiple empty lines at the end of file +note[EndingNewline]: multiple empty lines at the end of file ┌─ tests/lints/multiple-eof-newline/source.wdl:11:2 │ 11 │ } diff --git a/wdl-lint/tests/lints/nonmatching-output/source.errors b/wdl-lint/tests/lints/nonmatching-output/source.errors index 7752aa20..8172420f 100644 --- a/wdl-lint/tests/lints/nonmatching-output/source.errors +++ b/wdl-lint/tests/lints/nonmatching-output/source.errors @@ -14,7 +14,7 @@ warning[NonmatchingOutput]: output `t` is missing from `meta.outputs` section in │ = fix: add a description of output `t` to documentation in `meta.outputs` -warning[NonmatchingOutput]: `outputs` section of `meta` for the task `qux` is out of order +note[NonmatchingOutput]: `outputs` section of `meta` for the task `qux` is out of order ┌─ tests/lints/nonmatching-output/source.wdl:44:9 │ 44 │ ╭ outputs: { diff --git a/wdl-lint/tests/lints/two-eof-newline/source.errors b/wdl-lint/tests/lints/two-eof-newline/source.errors index 7cb82cb5..e977ed8a 100644 --- a/wdl-lint/tests/lints/two-eof-newline/source.errors +++ b/wdl-lint/tests/lints/two-eof-newline/source.errors @@ -1,4 +1,4 @@ -warning[EndingNewline]: multiple empty lines at the end of file +note[EndingNewline]: multiple empty lines at the end of file ┌─ tests/lints/two-eof-newline/source.wdl:10:2 │ 10 │ } From 1b4351fef3a9e3c04cd6916d6d559e94643b2e89 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 30 Sep 2024 10:26:17 -0400 Subject: [PATCH 19/30] fix: downgrade some lint warnings to notes --- wdl-lint/src/rules/deprecated_placeholder_option.rs | 6 +++--- wdl-lint/src/rules/double_quotes.rs | 2 +- wdl-lint/src/rules/ending_newline.rs | 4 ++-- wdl-lint/src/rules/input_not_sorted.rs | 2 +- wdl-lint/src/rules/missing_requirements.rs | 2 +- wdl-lint/src/rules/nonmatching_output.rs | 2 +- wdl-lint/src/rules/runtime_section_keys.rs | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/wdl-lint/src/rules/deprecated_placeholder_option.rs b/wdl-lint/src/rules/deprecated_placeholder_option.rs index c731a171..56951b3a 100644 --- a/wdl-lint/src/rules/deprecated_placeholder_option.rs +++ b/wdl-lint/src/rules/deprecated_placeholder_option.rs @@ -25,7 +25,7 @@ const ID: &str = "DeprecatedPlaceholderOption"; /// Creates a diagnostic for the use of the deprecated `default` placeholder /// option. fn deprecated_default_placeholder_option(span: Span) -> Diagnostic { - Diagnostic::warning(String::from( + Diagnostic::note(String::from( "use of the deprecated `default` placeholder option", )) .with_rule(ID) @@ -38,7 +38,7 @@ fn deprecated_default_placeholder_option(span: Span) -> Diagnostic { /// Creates a diagnostic for the use of the deprecated `sep` placeholder option. fn deprecated_sep_placeholder_option(span: Span) -> Diagnostic { - Diagnostic::warning(String::from( + Diagnostic::note(String::from( "use of the deprecated `sep` placeholder option", )) .with_rule(ID) @@ -51,7 +51,7 @@ fn deprecated_sep_placeholder_option(span: Span) -> Diagnostic { /// Creates a diagnostic for the use of the deprecated `true`/`false` /// placeholder option. fn deprecated_true_false_placeholder_option(span: Span) -> Diagnostic { - Diagnostic::warning(String::from( + Diagnostic::note(String::from( "use of the deprecated `true`/`false` placeholder option", )) .with_rule(ID) diff --git a/wdl-lint/src/rules/double_quotes.rs b/wdl-lint/src/rules/double_quotes.rs index e0c9c5ec..6b0c7c1b 100644 --- a/wdl-lint/src/rules/double_quotes.rs +++ b/wdl-lint/src/rules/double_quotes.rs @@ -24,7 +24,7 @@ const ID: &str = "DoubleQuotes"; /// Creates a "use double quotes" diagnostic. fn use_double_quotes(span: Span) -> Diagnostic { - Diagnostic::warning("string defined with single quotes") + Diagnostic::note("string defined with single quotes") .with_rule(ID) .with_highlight(span) .with_fix("change the single quotes to double quotes") diff --git a/wdl-lint/src/rules/ending_newline.rs b/wdl-lint/src/rules/ending_newline.rs index 0a35a49e..21813b62 100644 --- a/wdl-lint/src/rules/ending_newline.rs +++ b/wdl-lint/src/rules/ending_newline.rs @@ -21,7 +21,7 @@ const ID: &str = "EndingNewline"; /// Creates a "missing ending newline" diagnostic. fn missing_ending_newline(span: Span) -> Diagnostic { - Diagnostic::warning("missing newline at the end of the file") + Diagnostic::note("missing newline at the end of the file") .with_rule(ID) .with_label("expected a newline to follow this", span) .with_fix("add an empty line at the end of the file") @@ -29,7 +29,7 @@ fn missing_ending_newline(span: Span) -> Diagnostic { /// Creates a "multiple ending newline" diagnostic. fn multiple_ending_newline(span: Span, count: usize) -> Diagnostic { - Diagnostic::warning("multiple empty lines at the end of file") + Diagnostic::note("multiple empty lines at the end of file") .with_rule(ID) .with_label( if count > 1 { diff --git a/wdl-lint/src/rules/input_not_sorted.rs b/wdl-lint/src/rules/input_not_sorted.rs index 5ceed699..1af62ad4 100644 --- a/wdl-lint/src/rules/input_not_sorted.rs +++ b/wdl-lint/src/rules/input_not_sorted.rs @@ -26,7 +26,7 @@ const ID: &str = "InputSorting"; /// Creates a "input not sorted" diagnostic. fn input_not_sorted(span: Span, sorted_inputs: String) -> Diagnostic { - Diagnostic::warning("input not sorted") + Diagnostic::note("input not sorted") .with_rule(ID) .with_label("input section must be sorted".to_string(), span) .with_fix(format!("sort input statements as: \n{}", sorted_inputs)) diff --git a/wdl-lint/src/rules/missing_requirements.rs b/wdl-lint/src/rules/missing_requirements.rs index 22aefe1e..38d12701 100644 --- a/wdl-lint/src/rules/missing_requirements.rs +++ b/wdl-lint/src/rules/missing_requirements.rs @@ -24,7 +24,7 @@ const ID: &str = "MissingRequirements"; /// Creates a "deprecated runtime section" diagnostic. fn deprecated_runtime_section(task: &str, span: Span) -> Diagnostic { - Diagnostic::warning(format!( + Diagnostic::note(format!( "task `{task}` contains a deprecated `runtime` section" )) .with_rule(ID) diff --git a/wdl-lint/src/rules/nonmatching_output.rs b/wdl-lint/src/rules/nonmatching_output.rs index f24fa80a..5d687a1c 100755 --- a/wdl-lint/src/rules/nonmatching_output.rs +++ b/wdl-lint/src/rules/nonmatching_output.rs @@ -63,7 +63,7 @@ fn extra_output_in_meta(span: Span, name: &str, item_name: &str, ty: &str) -> Di /// Creates a diagnostic for out-of-order entries. fn out_of_order(span: Span, output_span: Span, item_name: &str, ty: &str) -> Diagnostic { - Diagnostic::warning(format!( + Diagnostic::note(format!( "`outputs` section of `meta` for the {ty} `{item_name}` is out of order" )) .with_rule(ID) diff --git a/wdl-lint/src/rules/runtime_section_keys.rs b/wdl-lint/src/rules/runtime_section_keys.rs index 6060245f..6063a69c 100644 --- a/wdl-lint/src/rules/runtime_section_keys.rs +++ b/wdl-lint/src/rules/runtime_section_keys.rs @@ -145,7 +145,7 @@ fn serialize_oxford_comma(items: &[T]) -> Option { /// Creates a "deprecated runtime key" diagnostic. fn deprecated_runtime_key(key: &Ident, replacement: &str) -> Diagnostic { - Diagnostic::warning(format!( + Diagnostic::note(format!( "the `{key}` runtime key has been deprecated in favor of `{replacement}`", key = key.as_str() )) From e0f3d0cd6f71c396a1141468092aff9d16eb32cc Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 30 Sep 2024 12:58:00 -0400 Subject: [PATCH 20/30] revise: clean up tests --- wdl-lint/src/rules/nonmatching_output.rs | 1 + .../source.errors | 26 +++++++ .../source.errors | 2 + .../lints/missing-comment-space/source.errors | 12 ++-- .../lints/missing-comment-space/source.wdl | 5 +- .../source.errors | 4 +- .../source.wdl | 6 +- .../tests/lints/missing-meta/source.errors | 4 +- wdl-lint/tests/lints/missing-meta/source.wdl | 13 ++-- .../tests/lints/missing-output/source.errors | 4 +- .../tests/lints/missing-output/source.wdl | 3 +- .../missing-parameter_meta/source.errors | 4 +- .../lints/missing-parameter_meta/source.wdl | 7 +- .../lints/missing-preamble-ws/source.errors | 14 +++- .../lints/missing-preamble-ws/source.wdl | 4 +- .../missing-requirements-block/source.errors | 11 ++- .../missing-requirements-block/source.wdl | 17 +++-- .../lints/missing-runtime-block/source.errors | 13 +++- .../lints/missing-runtime-block/source.wdl | 14 ++-- .../lints/multiple-eof-newline/source.errors | 6 +- .../lints/multiple-eof-newline/source.wdl | 5 +- .../lints/no-preamble-comments/source.errors | 0 .../lints/no-preamble-comments/source.wdl | 11 --- .../lints/nonmatching-output/source.errors | 68 +++++++++---------- .../tests/lints/nonmatching-output/source.wdl | 45 +++++++++--- .../tests/lints/one-eof-newline/source.wdl | 5 +- .../source.errors | 14 ++-- .../one-invalid-preamble-comment/source.wdl | 9 +-- .../one-line-after-version/source.errors | 10 +-- .../lints/one-line-after-version/source.wdl | 3 + .../tests/lints/only-whitespace/source.errors | 46 +++++++------ .../tests/lints/only-whitespace/source.wdl | 9 +-- .../source.errors | 26 ++++--- .../preamble-comment-after-version/source.wdl | 4 +- .../tests/lints/preamble-ws/source.errors | 28 ++++++-- wdl-lint/tests/lints/preamble-ws/source.wdl | 4 +- .../runtime-keys-engine-keys/source.errors | 24 ++++--- .../lints/runtime-keys-engine-keys/source.wdl | 10 ++- .../source.errors | 6 -- .../runtime-keys-engine-no-version/source.wdl | 37 ---------- .../source.errors | 26 +++---- .../source.wdl | 9 +-- .../lints/runtime-keys-wdl-1.0/source.errors | 44 +++++++++--- .../lints/runtime-keys-wdl-1.0/source.wdl | 25 +++++-- .../lints/runtime-keys-wdl-1.1/source.errors | 34 +++++----- .../lints/runtime-keys-wdl-1.1/source.wdl | 22 ++++-- .../lints/runtime-keys-wdl-1.2/source.errors | 24 +++++++ .../lints/runtime-keys-wdl-1.2/source.wdl | 10 +-- .../tests/lints/section-ordering/source.wdl | 4 +- wdl-lint/tests/lints/snake-case/source.errors | 28 ++++---- wdl-lint/tests/lints/snake-case/source.wdl | 34 ++++++---- .../struct-matching-param-meta/source.errors | 16 ++--- .../struct-matching-param-meta/source.wdl | 6 +- wdl-lint/tests/lints/todo/source.wdl | 10 +-- .../too-many-pounds-preamble/source.errors | 8 +-- .../lints/too-many-pounds-preamble/source.wdl | 4 +- .../tests/lints/trailing-comma/source.errors | 58 ++++++++-------- .../tests/lints/trailing-comma/source.wdl | 4 +- .../trailing-comment-whitespace/source.errors | 34 ++++------ .../trailing-comment-whitespace/source.wdl | 7 +- .../tests/lints/two-eof-newline/source.wdl | 4 +- .../tests/lints/unknown_rule/source.errors | 24 +------ wdl-lint/tests/lints/unknown_rule/source.wdl | 4 +- .../unnecessary-preamble-ws/source.errors | 15 ++-- .../lints/unnecessary-preamble-ws/source.wdl | 3 - .../lints/ws-after-blank-line/source.errors | 10 --- .../lints/ws-after-blank-line/source.wdl | 11 --- 67 files changed, 564 insertions(+), 448 deletions(-) delete mode 100644 wdl-lint/tests/lints/no-preamble-comments/source.errors delete mode 100644 wdl-lint/tests/lints/no-preamble-comments/source.wdl delete mode 100644 wdl-lint/tests/lints/runtime-keys-engine-no-version/source.errors delete mode 100644 wdl-lint/tests/lints/runtime-keys-engine-no-version/source.wdl delete mode 100644 wdl-lint/tests/lints/ws-after-blank-line/source.errors delete mode 100644 wdl-lint/tests/lints/ws-after-blank-line/source.wdl diff --git a/wdl-lint/src/rules/nonmatching_output.rs b/wdl-lint/src/rules/nonmatching_output.rs index 5d687a1c..493bdc7b 100755 --- a/wdl-lint/src/rules/nonmatching_output.rs +++ b/wdl-lint/src/rules/nonmatching_output.rs @@ -76,6 +76,7 @@ fn out_of_order(span: Span, output_span: Span, item_name: &str, ty: &str) -> Dia /// Creates a diagnostic for non-object `meta.outputs` entries. fn non_object_meta_outputs(span: Span, item_name: &str, ty: &str) -> Diagnostic { + // TODO: this message is way too long Diagnostic::warning(format!( "`outputs` key in `meta` section is reserved for an object with keys corresponding to \ declared `output` values. {ty} `{item_name}` has a `meta.outputs` key that is not an \ diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors index 3723ab64..3c306fa8 100755 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors @@ -24,18 +24,24 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 10 │ │ 11 │ │ # This is OK (but the prior line is not). │ ╰────^ + │ + = fix: remove the blank line(s) note[BlankLinesBetweenElements]: missing blank line ┌─ tests/lints/blank-lines-between-elements/source.wdl:14:5 │ 14 │ parameter_meta {} │ ^^^^^^^^^^^^^^^^^ + │ + = fix: add a blank line before this element note[BlankLinesBetweenElements]: missing blank line ┌─ tests/lints/blank-lines-between-elements/source.wdl:15:5 │ 15 │ # what about this comment? │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: add a blank line before this element note[BlankLinesBetweenElements]: missing blank line ┌─ tests/lints/blank-lines-between-elements/source.wdl:17:5 @@ -44,6 +50,8 @@ note[BlankLinesBetweenElements]: missing blank line 18 │ │ call bar { input: s = i } 19 │ │ } │ ╰─────^ + │ + = fix: add a blank line before this element note[Whitespace]: more than one blank line in a row ┌─ tests/lints/blank-lines-between-elements/source.wdl:25:1 @@ -83,6 +91,8 @@ note[BlankLinesBetweenElements]: missing blank line 69 │ │ 70 │ │ } │ ╰─^ + │ + = fix: add a blank line before this element note[MissingMetas]: task `bar` is missing a `parameter_meta` section ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:6 @@ -108,6 +118,8 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 47 │ │ 48 │ │ meta { │ ╰────^ + │ + = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:11 @@ -117,6 +129,8 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 49 │ │ 50 │ │ description: "bar" │ ╰────────^ + │ + = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found ┌─ tests/lints/blank-lines-between-elements/source.wdl:50:27 @@ -126,6 +140,8 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 51 │ │ 52 │ │ outputs: { │ ╰────────^ + │ + = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found ┌─ tests/lints/blank-lines-between-elements/source.wdl:53:19 @@ -135,6 +151,8 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 54 │ │ 55 │ │ } │ ╰────────^ + │ + = fix: remove the blank line(s) note[InputSorting]: input not sorted ┌─ tests/lints/blank-lines-between-elements/source.wdl:58:5 @@ -166,6 +184,8 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 60 │ │ 61 │ │ String? t │ ╰────────^ + │ + = fix: remove the blank line(s) note[DisallowedInputName]: declaration identifier must be at least 3 characters ┌─ tests/lints/blank-lines-between-elements/source.wdl:61:17 @@ -208,6 +228,8 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 85 │ │ 86 │ │ disks: "50 GB" │ ╰────────^ + │ + = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found ┌─ tests/lints/blank-lines-between-elements/source.wdl:87:23 @@ -217,6 +239,8 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 88 │ │ 89 │ │ container: "ubuntu:latest" │ ╰────────^ + │ + = fix: remove the blank line(s) note[ContainerValue]: container URI uses a mutable tag ┌─ tests/lints/blank-lines-between-elements/source.wdl:89:20 @@ -234,4 +258,6 @@ note[BlankLinesBetweenElements]: extra blank line(s) found 90 │ │ 91 │ │ } │ ╰────^ + │ + = fix: remove the blank line(s) diff --git a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors index ae43b875..465e55be 100644 --- a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors +++ b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors @@ -15,4 +15,6 @@ note[BlankLinesBetweenElements]: missing blank line 11 │ │ output {} 12 │ │ } │ ╰─^ + │ + = fix: add a blank line before this element diff --git a/wdl-lint/tests/lints/missing-comment-space/source.errors b/wdl-lint/tests/lints/missing-comment-space/source.errors index d3a0a87c..1b6caf83 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.errors +++ b/wdl-lint/tests/lints/missing-comment-space/source.errors @@ -1,21 +1,21 @@ note[CommentWhitespace]: comment delimiter should be followed by a single space - ┌─ tests/lints/missing-comment-space/source.wdl:1:1 + ┌─ tests/lints/missing-comment-space/source.wdl:3:1 │ -1 │ ##This preamble comment is missing a space. +3 │ ##This preamble comment is missing a space. │ ^^ │ = fix: follow this comment delimiter with a single space note[PreambleFormatting]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/missing-comment-space/source.wdl:1:1 + ┌─ tests/lints/missing-comment-space/source.wdl:3:1 │ -1 │ ##This preamble comment is missing a space. +3 │ ##This preamble comment is missing a space. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/missing-comment-space/source.wdl:2:3 + ┌─ tests/lints/missing-comment-space/source.wdl:4:3 │ -2 │ ## +4 │ ## │ ^ │ = fix: remove this trailing whitespace diff --git a/wdl-lint/tests/lints/missing-comment-space/source.wdl b/wdl-lint/tests/lints/missing-comment-space/source.wdl index 72cfc01d..c823b716 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.wdl +++ b/wdl-lint/tests/lints/missing-comment-space/source.wdl @@ -1,6 +1,9 @@ +#@ except: Todo + ##This preamble comment is missing a space. ## -## But this one isn't and neither are the empty ones +## TODO: Line1 creates two diagnostics, one for CommentWhitespace and +## one for PreambleFormatting. Only one of the errors is expected. ## version 1.1 diff --git a/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.errors b/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.errors index 0b1f3fe1..10b2142d 100644 --- a/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.errors +++ b/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.errors @@ -1,7 +1,7 @@ note[MissingMetas]: workflow `test` is missing both meta and parameter_meta sections - ┌─ tests/lints/missing-meta-and-parameter_meta/source.wdl:7:10 + ┌─ tests/lints/missing-meta-and-parameter_meta/source.wdl:5:10 │ -7 │ workflow test { +5 │ workflow test { │ ^^^^ this workflow is missing both meta and parameter_meta sections │ = fix: add meta and parameter_meta sections to the workflow diff --git a/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.wdl b/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.wdl index e0ddbe09..b24a2e35 100644 --- a/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.wdl +++ b/wdl-lint/tests/lints/missing-meta-and-parameter_meta/source.wdl @@ -1,16 +1,18 @@ -#@ except: BlankLinesBetweenElements, DisallowedInputName, DisallowedOutputName - ## This is a test of missing both the meta and parameter_meta version 1.0 workflow test { + #@ except: DisallowedInputName input { File input_file } + call test_task { input: input_file = input_file } + + #@ except: DisallowedOutputName output { File output_file = test_task.output_file } diff --git a/wdl-lint/tests/lints/missing-meta/source.errors b/wdl-lint/tests/lints/missing-meta/source.errors index 25e86400..7a5db00e 100644 --- a/wdl-lint/tests/lints/missing-meta/source.errors +++ b/wdl-lint/tests/lints/missing-meta/source.errors @@ -1,7 +1,7 @@ note[MissingMetas]: task `test` is missing a `meta` section - ┌─ tests/lints/missing-meta/source.wdl:5:6 + ┌─ tests/lints/missing-meta/source.wdl:3:6 │ -5 │ task test { +3 │ task test { │ ^^^^ this task is missing a `meta` section │ = fix: add a `meta` section to the task diff --git a/wdl-lint/tests/lints/missing-meta/source.wdl b/wdl-lint/tests/lints/missing-meta/source.wdl index 583bb286..24e79b18 100644 --- a/wdl-lint/tests/lints/missing-meta/source.wdl +++ b/wdl-lint/tests/lints/missing-meta/source.wdl @@ -1,13 +1,16 @@ -#@ except: BlankLinesBetweenElements, RuntimeSectionKeys, SectionOrdering - version 1.0 task test { - runtime {} - command <<<>>> - input {} parameter_meta {} + + input {} + + command <<<>>> + output {} + + #@ except: RuntimeSectionKeys + runtime {} } # This should not have diagnostics for <= 1.2 diff --git a/wdl-lint/tests/lints/missing-output/source.errors b/wdl-lint/tests/lints/missing-output/source.errors index 325c8c64..9c3a23be 100644 --- a/wdl-lint/tests/lints/missing-output/source.errors +++ b/wdl-lint/tests/lints/missing-output/source.errors @@ -1,7 +1,7 @@ warning[MissingOutput]: workflow `test` is missing an output section - ┌─ tests/lints/missing-output/source.wdl:5:10 + ┌─ tests/lints/missing-output/source.wdl:3:10 │ -5 │ workflow test { +3 │ workflow test { │ ^^^^ this workflow is missing an output section │ = fix: add an output section to the workflow diff --git a/wdl-lint/tests/lints/missing-output/source.wdl b/wdl-lint/tests/lints/missing-output/source.wdl index ccc816c2..b1c515b3 100644 --- a/wdl-lint/tests/lints/missing-output/source.wdl +++ b/wdl-lint/tests/lints/missing-output/source.wdl @@ -1,7 +1,6 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - version 1.0 workflow test { + #@ except: DescriptionMissing meta {} } diff --git a/wdl-lint/tests/lints/missing-parameter_meta/source.errors b/wdl-lint/tests/lints/missing-parameter_meta/source.errors index 5c68f499..60ecf8ba 100644 --- a/wdl-lint/tests/lints/missing-parameter_meta/source.errors +++ b/wdl-lint/tests/lints/missing-parameter_meta/source.errors @@ -1,7 +1,7 @@ note[MissingMetas]: workflow `test` is missing a `parameter_meta` section - ┌─ tests/lints/missing-parameter_meta/source.wdl:5:10 + ┌─ tests/lints/missing-parameter_meta/source.wdl:3:10 │ -5 │ workflow test { +3 │ workflow test { │ ^^^^ this workflow is missing a `parameter_meta` section │ = fix: add a `parameter_meta` section to the workflow diff --git a/wdl-lint/tests/lints/missing-parameter_meta/source.wdl b/wdl-lint/tests/lints/missing-parameter_meta/source.wdl index 6dfa858b..e0c0892b 100644 --- a/wdl-lint/tests/lints/missing-parameter_meta/source.wdl +++ b/wdl-lint/tests/lints/missing-parameter_meta/source.wdl @@ -1,11 +1,12 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, SectionOrdering - version 1.0 workflow test { + #@ except: DescriptionMissing + meta {} + input {} + output {} - meta {} } # This should not have diagnostics for <= 1.2 diff --git a/wdl-lint/tests/lints/missing-preamble-ws/source.errors b/wdl-lint/tests/lints/missing-preamble-ws/source.errors index 4393b651..aea33ae2 100644 --- a/wdl-lint/tests/lints/missing-preamble-ws/source.errors +++ b/wdl-lint/tests/lints/missing-preamble-ws/source.errors @@ -1,8 +1,16 @@ +note[PreambleFormatting]: expected exactly one blank line between lint directives and preamble comments + ┌─ tests/lints/missing-preamble-ws/source.wdl:1:30 + │ +1 │ #@ except: DescriptionMissing + │ ╭─────────────────────────────^ +2 │ │ ## This is a test of missing preamble whitespace. + │ ╰^ + note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement - ┌─ tests/lints/missing-preamble-ws/source.wdl:3:50 + ┌─ tests/lints/missing-preamble-ws/source.wdl:2:50 │ -3 │ ## This is a test of missing preamble whitespace. +2 │ ## This is a test of missing preamble whitespace. │ ╭─────────────────────────────────────────────────^ -4 │ │ version 1.1 +3 │ │ version 1.1 │ ╰^ diff --git a/wdl-lint/tests/lints/missing-preamble-ws/source.wdl b/wdl-lint/tests/lints/missing-preamble-ws/source.wdl index 478fed79..c36afbd5 100644 --- a/wdl-lint/tests/lints/missing-preamble-ws/source.wdl +++ b/wdl-lint/tests/lints/missing-preamble-ws/source.wdl @@ -1,9 +1,9 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - +#@ except: DescriptionMissing ## This is a test of missing preamble whitespace. version 1.1 workflow text { meta {} + output {} } diff --git a/wdl-lint/tests/lints/missing-requirements-block/source.errors b/wdl-lint/tests/lints/missing-requirements-block/source.errors index 26bd3410..69c47f56 100644 --- a/wdl-lint/tests/lints/missing-requirements-block/source.errors +++ b/wdl-lint/tests/lints/missing-requirements-block/source.errors @@ -7,19 +7,18 @@ warning[MissingRequirements]: task `bad` is missing a `requirements` section = fix: add a `requirements` section to the task warning[MissingRequirements]: task `deprecated_runtime` is missing a `requirements` section - ┌─ tests/lints/missing-requirements-block/source.wdl:21:6 + ┌─ tests/lints/missing-requirements-block/source.wdl:25:6 │ -21 │ task deprecated_runtime { +25 │ task deprecated_runtime { │ ^^^^^^^^^^^^^^^^^^ this task is missing a `requirements` section │ = fix: add a `requirements` section to the task note[MissingRequirements]: task `deprecated_runtime` contains a deprecated `runtime` section - ┌─ tests/lints/missing-requirements-block/source.wdl:27:5 + ┌─ tests/lints/missing-requirements-block/source.wdl:33:5 │ -27 │ ╭ runtime { -28 │ │ -29 │ │ } +33 │ ╭ runtime { +34 │ │ } │ ╰─────^ │ = fix: replace the `runtime` section with a `requirements` section diff --git a/wdl-lint/tests/lints/missing-requirements-block/source.wdl b/wdl-lint/tests/lints/missing-requirements-block/source.wdl index 24b51411..cb0e5cda 100644 --- a/wdl-lint/tests/lints/missing-requirements-block/source.wdl +++ b/wdl-lint/tests/lints/missing-requirements-block/source.wdl @@ -1,30 +1,35 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, SectionOrdering +#@ except: DescriptionMissing, Todo version 1.2 task bad { meta {} - output {} + command <<<>>> + + output {} } task good { meta {} - output {} + command <<<>>> - requirements { + output {} + requirements { } } +# TODO: This emits two diagnostics but should only emit one. task deprecated_runtime { meta {} - output {} + command <<<>>> + output {} + # This `runtime` section should be flagged as deprecated. runtime { - } } diff --git a/wdl-lint/tests/lints/missing-runtime-block/source.errors b/wdl-lint/tests/lints/missing-runtime-block/source.errors index 8d66444a..30238e49 100644 --- a/wdl-lint/tests/lints/missing-runtime-block/source.errors +++ b/wdl-lint/tests/lints/missing-runtime-block/source.errors @@ -1,8 +1,17 @@ warning[MissingRuntime]: task `bad` is missing a `runtime` section - ┌─ tests/lints/missing-runtime-block/source.wdl:8:6 + ┌─ tests/lints/missing-runtime-block/source.wdl:7:6 │ -8 │ task bad { +7 │ task bad { │ ^^^ this task is missing a `runtime` section │ = fix: add a `runtime` section to the task +note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.1 specification: `container` + ┌─ tests/lints/missing-runtime-block/source.wdl:22:5 + │ +22 │ ╭ runtime { +23 │ │ } + │ ╰─────^ + │ + = fix: include an entry for the `container` key in the `runtime` section + diff --git a/wdl-lint/tests/lints/missing-runtime-block/source.wdl b/wdl-lint/tests/lints/missing-runtime-block/source.wdl index 40413920..636bcea7 100644 --- a/wdl-lint/tests/lints/missing-runtime-block/source.wdl +++ b/wdl-lint/tests/lints/missing-runtime-block/source.wdl @@ -1,5 +1,4 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, RuntimeSectionKeys -#@ except: SectionOrdering +#@ except: DescriptionMissing ## This is a test of the `missing_runtime_block` lint @@ -7,16 +6,19 @@ version 1.1 task bad { meta {} - output {} + command <<<>>> + + output {} } task good { meta {} + + command <<<>>> + output {} - runtime { + runtime { } - - command <<<>>> } diff --git a/wdl-lint/tests/lints/multiple-eof-newline/source.errors b/wdl-lint/tests/lints/multiple-eof-newline/source.errors index 553d1a30..14b2bf05 100644 --- a/wdl-lint/tests/lints/multiple-eof-newline/source.errors +++ b/wdl-lint/tests/lints/multiple-eof-newline/source.errors @@ -1,14 +1,14 @@ note[EndingNewline]: multiple empty lines at the end of file - ┌─ tests/lints/multiple-eof-newline/source.wdl:11:2 + ┌─ tests/lints/multiple-eof-newline/source.wdl:12:2 │ -11 │ } +12 │ } │ ╭─^ -12 │ │ 13 │ │ 14 │ │ 15 │ │ 16 │ │ 17 │ │ +18 │ │ │ ╰^ duplicate newlines here │ = fix: remove all but one empty line at the end of the file diff --git a/wdl-lint/tests/lints/multiple-eof-newline/source.wdl b/wdl-lint/tests/lints/multiple-eof-newline/source.wdl index f5c7570d..896e31e0 100644 --- a/wdl-lint/tests/lints/multiple-eof-newline/source.wdl +++ b/wdl-lint/tests/lints/multiple-eof-newline/source.wdl @@ -1,12 +1,13 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - ## This is a test of multiple EOF newlines lint version 1.1 workflow test { + #@ except: DescriptionMissing meta {} + parameter_meta {} + output {} } diff --git a/wdl-lint/tests/lints/no-preamble-comments/source.errors b/wdl-lint/tests/lints/no-preamble-comments/source.errors deleted file mode 100644 index e69de29b..00000000 diff --git a/wdl-lint/tests/lints/no-preamble-comments/source.wdl b/wdl-lint/tests/lints/no-preamble-comments/source.wdl deleted file mode 100644 index 0f886881..00000000 --- a/wdl-lint/tests/lints/no-preamble-comments/source.wdl +++ /dev/null @@ -1,11 +0,0 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - -version 1.1 - -# This is a test of having no preamble comments and correct whitespace - -workflow test { - meta {} - parameter_meta {} - output {} -} diff --git a/wdl-lint/tests/lints/nonmatching-output/source.errors b/wdl-lint/tests/lints/nonmatching-output/source.errors index 8172420f..2bf0ab80 100644 --- a/wdl-lint/tests/lints/nonmatching-output/source.errors +++ b/wdl-lint/tests/lints/nonmatching-output/source.errors @@ -1,114 +1,114 @@ warning[NonmatchingOutput]: `outputs` key missing in `meta` section for the task `bar` - ┌─ tests/lints/nonmatching-output/source.wdl:20:5 + ┌─ tests/lints/nonmatching-output/source.wdl:22:5 │ -20 │ meta {} +22 │ meta {} │ ^^^^^^^ │ = fix: add an `outputs` key to `meta` section describing the outputs warning[NonmatchingOutput]: output `t` is missing from `meta.outputs` section in task `baz` - ┌─ tests/lints/nonmatching-output/source.wdl:37:9 + ┌─ tests/lints/nonmatching-output/source.wdl:43:9 │ -37 │ String t = "world" +43 │ String t = "world" │ ^^^^^^^^^^^^^^^^^^ │ = fix: add a description of output `t` to documentation in `meta.outputs` note[NonmatchingOutput]: `outputs` section of `meta` for the task `qux` is out of order - ┌─ tests/lints/nonmatching-output/source.wdl:44:9 + ┌─ tests/lints/nonmatching-output/source.wdl:50:9 │ -44 │ ╭ outputs: { -45 │ │ t: "t", -46 │ │ s: "s", -47 │ │ } +50 │ ╭ outputs: { +51 │ │ t: "t", +52 │ │ s: "s", +53 │ │ } │ ╰───────────^ · │ -50 │ ╭ output { -51 │ │ String s = "hello" -52 │ │ String t = "world" -53 │ │ } +58 │ ╭ output { +59 │ │ String s = "hello" +60 │ │ String t = "world" +61 │ │ } │ ╰─────' │ = fix: ensure the keys within `meta.outputs` have the same order as they appear in `output` warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `quux` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:62:13 + ┌─ tests/lints/nonmatching-output/source.wdl:70:13 │ -62 │ v: "v" +70 │ v: "v", │ ^^^^^^ │ = fix: ensure the output exists or remove the `v` key from `meta.outputs` warning[NonmatchingOutput]: `outputs` key in `meta` section is reserved for an object with keys corresponding to declared `output` values. task `corge` has a `meta.outputs` key that is not an object - ┌─ tests/lints/nonmatching-output/source.wdl:76:9 + ┌─ tests/lints/nonmatching-output/source.wdl:86:9 │ -76 │ outputs: "string" +86 │ outputs: "string" │ ^^^^^^^^^^^^^^^^^ │ = fix: ensure `meta.outputs` is an object containing descriptions for each output warning[NonmatchingOutput]: output `s` is missing from `meta.outputs` section in task `corge` - ┌─ tests/lints/nonmatching-output/source.wdl:80:9 + ┌─ tests/lints/nonmatching-output/source.wdl:92:9 │ -80 │ String s = "hello" +92 │ String s = "hello" │ ^^^^^^^^^^^^^^^^^^ │ = fix: add a description of output `s` to documentation in `meta.outputs` warning[NonmatchingOutput]: output `t` is missing from `meta.outputs` section in task `corge` - ┌─ tests/lints/nonmatching-output/source.wdl:81:9 + ┌─ tests/lints/nonmatching-output/source.wdl:93:9 │ -81 │ String t = "world" +93 │ String t = "world" │ ^^^^^^^^^^^^^^^^^^ │ = fix: add a description of output `t` to documentation in `meta.outputs` warning[NonmatchingOutput]: output `v` is missing from `meta.outputs` section in task `corge` - ┌─ tests/lints/nonmatching-output/source.wdl:82:9 + ┌─ tests/lints/nonmatching-output/source.wdl:94:9 │ -82 │ String v = "!" +94 │ String v = "!" │ ^^^^^^^^^^^^^^ │ = fix: add a description of output `v` to documentation in `meta.outputs` note[MisplacedLintDirective]: lint directive `NonmatchingOutput` has no effect above metadata object item - ┌─ tests/lints/nonmatching-output/source.wdl:102:24 + ┌─ tests/lints/nonmatching-output/source.wdl:113:24 │ -102 │ #@ except: NonmatchingOutput +113 │ #@ except: NonmatchingOutput │ ^^^^^^^^^^^^^^^^^ cannot make an exception for this rule -103 │ v: "v" +114 │ v: "v", │ ------ invalid element for this lint directive │ = fix: valid locations for this directive are above: version statement, task definition, workflow definition warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `garply` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:103:13 + ┌─ tests/lints/nonmatching-output/source.wdl:114:13 │ -103 │ v: "v" +114 │ v: "v", │ ^^^^^^ │ = fix: ensure the output exists or remove the `v` key from `meta.outputs` warning[NonmatchingOutput]: `s` appears in `outputs` section of the task `quuux` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:168:13 + ┌─ tests/lints/nonmatching-output/source.wdl:187:13 │ -168 │ s: "s", +187 │ s: "s", │ ^^^^^^ │ = fix: ensure the output exists or remove the `s` key from `meta.outputs` warning[NonmatchingOutput]: `t` appears in `outputs` section of the task `quuux` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:169:13 + ┌─ tests/lints/nonmatching-output/source.wdl:188:13 │ -169 │ t: "t", +188 │ t: "t", │ ^^^^^^ │ = fix: ensure the output exists or remove the `t` key from `meta.outputs` warning[NonmatchingOutput]: `v` appears in `outputs` section of the task `quuux` but is not a declared `output` - ┌─ tests/lints/nonmatching-output/source.wdl:170:13 + ┌─ tests/lints/nonmatching-output/source.wdl:189:13 │ -170 │ v: "v" +189 │ v: "v", │ ^^^^^^ │ = fix: ensure the output exists or remove the `v` key from `meta.outputs` diff --git a/wdl-lint/tests/lints/nonmatching-output/source.wdl b/wdl-lint/tests/lints/nonmatching-output/source.wdl index 467642ae..8fcfa5be 100644 --- a/wdl-lint/tests/lints/nonmatching-output/source.wdl +++ b/wdl-lint/tests/lints/nonmatching-output/source.wdl @@ -1,4 +1,4 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing, DisallowedOutputName, LineWidth, MissingRuntime, TrailingComma +#@ except: DescriptionMissing, DisallowedOutputName, MissingRuntime version 1.1 @@ -9,7 +9,9 @@ task foo { out: "String output of task foo" } } + command <<< >>> + output { String out = read_string(stdout()) } @@ -18,7 +20,9 @@ task foo { # This task should trigger a warning for missing `meta.outputs`. task bar { meta {} + command <<< >>> + output { String s = "hello" } @@ -31,7 +35,9 @@ task baz { s: "String output of task baz" } } + command <<< >>> + output { String s = "hello" String t = "world" @@ -46,7 +52,9 @@ task qux { s: "s", } } + command <<< >>> + output { String s = "hello" String t = "world" @@ -59,10 +67,12 @@ task quux { outputs: { s: "s", t: "t", - v: "v" + v: "v", } } + command <<< >>> + output { String s = "hello" String t = "world" @@ -75,7 +85,9 @@ task corge { meta { outputs: "string" } + command <<< >>> + output { String s = "hello" String t = "world" @@ -86,24 +98,25 @@ task corge { # This task should not trigger any warnings. task grault { meta {} + command <<< >>> - output {} # There should be no warnings here. + + output {} # There should be no warnings here. } -# This task should not trigger a warning due to `#@ except`. task garply { - # except works here meta { - # except doesn't work here. In fact, this triggers a missing "outputs" warning. outputs: { s: "s", t: "t", - # This also works + # The next lint directive will _not_ work. #@ except: NonmatchingOutput - v: "v" + v: "v", } } + command <<< >>> + output { String s = "hello" String t = "world" @@ -117,10 +130,12 @@ task garply2 { outputs: { s: "s", t: "t", - v: "v" + v: "v", } } + command <<< >>> + output { String s = "hello" String t = "world" @@ -136,7 +151,9 @@ task waldo { t: "t", } } + command <<< >>> + output { String s = "hello" String t = "world" @@ -153,7 +170,9 @@ task waldo2 { t: "t", } } + command <<< >>> + output { String s = "hello" String t = "world" @@ -167,10 +186,12 @@ task quuux { outputs: { s: "s", t: "t", - v: "v" + v: "v", } } + command <<< >>> + output {} } @@ -181,11 +202,13 @@ task quuuux { # another comment s: { # adding a comment - description: "s" + description: "s", }, } } + command <<< >>> + output { String s = "string" } diff --git a/wdl-lint/tests/lints/one-eof-newline/source.wdl b/wdl-lint/tests/lints/one-eof-newline/source.wdl index ef7ed213..397e9348 100644 --- a/wdl-lint/tests/lints/one-eof-newline/source.wdl +++ b/wdl-lint/tests/lints/one-eof-newline/source.wdl @@ -1,12 +1,13 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - ## This is a test of the missing EOF newline lint ## `source.errors` should be empty version 1.1 workflow test { + #@ except: DescriptionMissing meta {} + parameter_meta {} + output {} } diff --git a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors index 758498c7..0ead7fcf 100644 --- a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors @@ -1,12 +1,12 @@ note[PreambleFormatting]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/one-invalid-preamble-comment/source.wdl:3:1 + ┌─ tests/lints/one-invalid-preamble-comment/source.wdl:1:1 │ - 3 │ ╭ # This is a test of having one big invalid preamble comment. - 4 │ │ # - 5 │ │ - 6 │ │ # All of the lines + 1 │ ╭ # This is a test of having one big invalid preamble comment. + 2 │ │ # + 3 │ │ + 4 │ │ # All of the lines · │ -12 │ │ # as a single diagnostic -13 │ │ # warning +10 │ │ ###### as a single diagnostic +11 │ │ # warning │ ╰─────────^ diff --git a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl index 62e75989..a04e2f33 100644 --- a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl +++ b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.wdl @@ -1,22 +1,23 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - # This is a test of having one big invalid preamble comment. # # All of the lines # in this comment # should be treated -# +### # -# as a single diagnostic +###### as a single diagnostic # warning ## This last one is fine though! version 1.1 workflow test { + #@ except: DescriptionMissing meta {} + parameter_meta {} + output {} } diff --git a/wdl-lint/tests/lints/one-line-after-version/source.errors b/wdl-lint/tests/lints/one-line-after-version/source.errors index 09e50adb..ae11a82d 100644 --- a/wdl-lint/tests/lints/one-line-after-version/source.errors +++ b/wdl-lint/tests/lints/one-line-after-version/source.errors @@ -1,14 +1,14 @@ error: there must be at least one task, workflow, or struct definition in the file - ┌─ tests/lints/one-line-after-version/source.wdl:6:1 + ┌─ tests/lints/one-line-after-version/source.wdl:9:1 │ -6 │ +9 │ │ note[VersionFormatting]: expected exactly one blank line after the version statement - ┌─ tests/lints/one-line-after-version/source.wdl:5:12 + ┌─ tests/lints/one-line-after-version/source.wdl:8:12 │ -5 │ version 1.1 +8 │ version 1.1 │ ╭───────────^ -6 │ │ +9 │ │ │ ╰^ diff --git a/wdl-lint/tests/lints/one-line-after-version/source.wdl b/wdl-lint/tests/lints/one-line-after-version/source.wdl index b1decdac..4a3c6a3f 100644 --- a/wdl-lint/tests/lints/one-line-after-version/source.wdl +++ b/wdl-lint/tests/lints/one-line-after-version/source.wdl @@ -1,5 +1,8 @@ +#@ except: Todo + ## This is a test of having just a single line after a version ## There should only be a single diagnostic in the output about ## needing a task/workflow/struct. +## TODO: There is an "extra" daignostic emitted. Fix this. version 1.1 diff --git a/wdl-lint/tests/lints/only-whitespace/source.errors b/wdl-lint/tests/lints/only-whitespace/source.errors index d1da8355..b56e7ff7 100644 --- a/wdl-lint/tests/lints/only-whitespace/source.errors +++ b/wdl-lint/tests/lints/only-whitespace/source.errors @@ -1,38 +1,46 @@ note[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:8:1 + ┌─ tests/lints/only-whitespace/source.wdl:6:1 │ -8 │ +6 │ │ ^^^^ │ = fix: remove the whitespace from this line note[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:11:1 - │ -11 │ - │ ^^^^^^^^^^ - │ - = fix: remove the whitespace from this line + ┌─ tests/lints/only-whitespace/source.wdl:9:1 + │ +9 │ + │ ^^^^^^^^^^ + │ + = fix: remove the whitespace from this line note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/only-whitespace/source.wdl:11:1 + ┌─ tests/lints/only-whitespace/source.wdl:9:1 │ -11 │ ╭ -12 │ │ -13 │ │ -14 │ │ workflow test { + 9 │ ╭ +10 │ │ +11 │ │ +12 │ │ workflow test { │ ╰^ │ = fix: remove the unnecessary blank lines note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/only-whitespace/source.wdl:14:16 + ┌─ tests/lints/only-whitespace/source.wdl:12:16 │ -14 │ workflow test { +12 │ workflow test { │ ^^^^ │ = fix: remove this trailing whitespace +note[Whitespace]: line contains trailing whitespace + ┌─ tests/lints/only-whitespace/source.wdl:13:34 + │ +13 │ #@ except: DescriptionMissing + │ ^^^^^^^^ + │ + = fix: remove this trailing whitespace + note[Whitespace]: line contains only whitespace ┌─ tests/lints/only-whitespace/source.wdl:15:1 │ @@ -42,17 +50,17 @@ note[Whitespace]: line contains only whitespace = fix: remove the whitespace from this line note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/only-whitespace/source.wdl:19:18 + ┌─ tests/lints/only-whitespace/source.wdl:18:18 │ -19 │ String x = "" +18 │ String x = "" │ ^^^^^^^^^^^ │ = fix: remove this trailing whitespace note[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:21:1 + ┌─ tests/lints/only-whitespace/source.wdl:22:1 │ -21 │ +22 │ │ ^^^^^ │ = fix: remove the whitespace from this line diff --git a/wdl-lint/tests/lints/only-whitespace/source.wdl b/wdl-lint/tests/lints/only-whitespace/source.wdl index 11ec0e54..f0f600c3 100644 --- a/wdl-lint/tests/lints/only-whitespace/source.wdl +++ b/wdl-lint/tests/lints/only-whitespace/source.wdl @@ -1,5 +1,3 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, SectionOrdering - ## This is a test of lines that only contain whitespace version 1.1 @@ -12,10 +10,13 @@ version 1.1 workflow test { - + #@ except: DescriptionMissing meta {} + parameter_meta {} - output {} + String x = "" + + output {} } diff --git a/wdl-lint/tests/lints/preamble-comment-after-version/source.errors b/wdl-lint/tests/lints/preamble-comment-after-version/source.errors index d856f804..91ba182f 100644 --- a/wdl-lint/tests/lints/preamble-comment-after-version/source.errors +++ b/wdl-lint/tests/lints/preamble-comment-after-version/source.errors @@ -1,22 +1,30 @@ note[PreambleFormatting]: unnecessary whitespace in document preamble - ┌─ tests/lints/preamble-comment-after-version/source.wdl:4:1 + ┌─ tests/lints/preamble-comment-after-version/source.wdl:2:1 │ -4 │ ## Bad leading whitespace! +2 │ ## Bad leading whitespace! │ ^^^^^^^ +note[CommentWhitespace]: comment has too much indentation + ┌─ tests/lints/preamble-comment-after-version/source.wdl:2:8 + │ +2 │ ## Bad leading whitespace! + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: this comment has 1 levels of indentation. It should have 0 levels of indentation. + error[PreambleCommentAfterVersion]: preamble comment after the version statement - ┌─ tests/lints/preamble-comment-after-version/source.wdl:8:1 + ┌─ tests/lints/preamble-comment-after-version/source.wdl:6:1 │ - 8 │ ╭ ## This is a preamble comment after the version + 6 │ ╭ ## This is a preamble comment after the version + 7 │ │ + 8 │ │ ## Also a preamble comment 9 │ │ -10 │ │ ## Also a preamble comment -11 │ │ -12 │ │ ## And this one is bad too! +10 │ │ ## And this one is bad too! │ ╰───────────────────────────^ error[PreambleCommentAfterVersion]: preamble comment after the version statement - ┌─ tests/lints/preamble-comment-after-version/source.wdl:21:5 + ┌─ tests/lints/preamble-comment-after-version/source.wdl:19:5 │ -21 │ ## This one is bad! +19 │ ## This one is bad! │ ^^^^^^^^^^^^^^^^^^^ diff --git a/wdl-lint/tests/lints/preamble-comment-after-version/source.wdl b/wdl-lint/tests/lints/preamble-comment-after-version/source.wdl index 685f749c..a7031115 100644 --- a/wdl-lint/tests/lints/preamble-comment-after-version/source.wdl +++ b/wdl-lint/tests/lints/preamble-comment-after-version/source.wdl @@ -1,5 +1,3 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing - ## This is a normal preamble comment. ## Bad leading whitespace! @@ -19,6 +17,8 @@ version 1.1 workflow test { ## This one is bad! + #@ except: DescriptionMissing meta {} + output {} } diff --git a/wdl-lint/tests/lints/preamble-ws/source.errors b/wdl-lint/tests/lints/preamble-ws/source.errors index effde666..f74b700e 100644 --- a/wdl-lint/tests/lints/preamble-ws/source.errors +++ b/wdl-lint/tests/lints/preamble-ws/source.errors @@ -1,16 +1,30 @@ +note[PreambleFormatting]: unnecessary whitespace in document preamble + ┌─ tests/lints/preamble-ws/source.wdl:1:1 + │ +1 │ #@ except: DescriptionMissing, Todo + │ ^^^^ + +note[CommentWhitespace]: in-line comments should be preceded by two spaces + ┌─ tests/lints/preamble-ws/source.wdl:1:5 + │ +1 │ #@ except: DescriptionMissing, Todo + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + │ + = fix: this comment must be preceded with two spaces + note[PreambleFormatting]: expected exactly one blank line between lint directives and preamble comments - ┌─ tests/lints/preamble-ws/source.wdl:1:57 + ┌─ tests/lints/preamble-ws/source.wdl:1:40 │ -1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing - │ ╭────────────────────────────────────────────────────────^ +1 │ #@ except: DescriptionMissing, Todo + │ ╭───────────────────────────────────────^ 2 │ │ ## This is a test of both missing and extraneous preamble whitespace. │ ╰^ note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement - ┌─ tests/lints/preamble-ws/source.wdl:2:70 + ┌─ tests/lints/preamble-ws/source.wdl:3:72 │ -2 │ ## This is a test of both missing and extraneous preamble whitespace. - │ ╭─────────────────────────────────────────────────────────────────────^ -3 │ │ version 1.1 +3 │ ## TODO: "Extra" diagnostic from CommentWhitespace should be addressed. + │ ╭───────────────────────────────────────────────────────────────────────^ +4 │ │ version 1.1 │ ╰────────^ diff --git a/wdl-lint/tests/lints/preamble-ws/source.wdl b/wdl-lint/tests/lints/preamble-ws/source.wdl index 56ba945e..0850dcb0 100644 --- a/wdl-lint/tests/lints/preamble-ws/source.wdl +++ b/wdl-lint/tests/lints/preamble-ws/source.wdl @@ -1,8 +1,10 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing + #@ except: DescriptionMissing, Todo ## This is a test of both missing and extraneous preamble whitespace. +## TODO: "Extra" diagnostic from CommentWhitespace should be addressed. version 1.1 workflow text { meta {} + output {} } diff --git a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors index e165cbc9..d84fc3e7 100644 --- a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.errors @@ -1,17 +1,25 @@ warning[RuntimeSectionKeys]: the following runtime keys are not reserved in the WDL v1.1 specification: `cromwell` and `miniwdl`; therefore, their inclusion in the `runtime` section is deprecated - ┌─ tests/lints/runtime-keys-engine-keys/source.wdl:9:5 + ┌─ tests/lints/runtime-keys-engine-keys/source.wdl:12:5 │ - 9 │ ╭ runtime { -10 │ │ container: "ubuntu" -11 │ │ cpu: 1 -12 │ │ disks: [] +12 │ ╭ runtime { +13 │ │ container: "ubuntu" +14 │ │ cpu: 1 +15 │ │ disks: [] · │ -17 │ │ cromwell: {} +20 │ │ cromwell: {} │ │ -------- the `cromwell` key should be removed -18 │ │ miniwdl: {} +21 │ │ miniwdl: {} │ │ ------- the `miniwdl` key should be removed -19 │ │ } +22 │ │ } │ ╰─────^ │ = fix: if reserved key names were intended, correct the spelling of each key; otherwise, remove the `cromwell` and `miniwdl` keys +warning[ContainerValue]: container URI is missing a tag + ┌─ tests/lints/runtime-keys-engine-keys/source.wdl:13:20 + │ +13 │ container: "ubuntu" + │ ^^^^^^^^ + │ + = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) + diff --git a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.wdl b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.wdl index c1c2184b..87c7a375 100644 --- a/wdl-lint/tests/lints/runtime-keys-engine-keys/source.wdl +++ b/wdl-lint/tests/lints/runtime-keys-engine-keys/source.wdl @@ -1,11 +1,14 @@ -#@ except: BlankLinesBetweenElements, ContainerValue, DescriptionMissing +#@ except: DescriptionMissing version 1.1 task a_task_with_engine_hints { meta {} + command <<<>>> + output {} + runtime { container: "ubuntu" cpu: 1 @@ -21,9 +24,12 @@ task a_task_with_engine_hints { task a_task_with_excepted_engine_hints { meta {} + command <<<>>> + output {} - #@ except: RuntimeSectionKeys + + #@ except: RuntimeSectionKeys, ContainerValue runtime { container: "ubuntu" cpu: 1 diff --git a/wdl-lint/tests/lints/runtime-keys-engine-no-version/source.errors b/wdl-lint/tests/lints/runtime-keys-engine-no-version/source.errors deleted file mode 100644 index 4b3ac2d7..00000000 --- a/wdl-lint/tests/lints/runtime-keys-engine-no-version/source.errors +++ /dev/null @@ -1,6 +0,0 @@ -error: a WDL document must start with a version statement - ┌─ tests/lints/runtime-keys-engine-no-version/source.wdl:3:1 - │ -3 │ task a_task_with_engine_hints { - │ ^ a version statement must come before this - diff --git a/wdl-lint/tests/lints/runtime-keys-engine-no-version/source.wdl b/wdl-lint/tests/lints/runtime-keys-engine-no-version/source.wdl deleted file mode 100644 index 9e92c3d4..00000000 --- a/wdl-lint/tests/lints/runtime-keys-engine-no-version/source.wdl +++ /dev/null @@ -1,37 +0,0 @@ -#@ except: DescriptionMissing - -task a_task_with_engine_hints { - meta {} - command <<<>>> - output {} - runtime { - container: "ubuntu" - cpu: 1 - disks: [] - gpu: false - maxRetries: 1 - memory: "1 GiB" - returnCodes: "*" - cromwell: {} - miniwdl: {} - } -} - -task a_task_with_excepted_engine_hints { - meta {} - command <<<>>> - output {} - runtime { - container: "ubuntu" - cpu: 1 - disks: [] - gpu: false - maxRetries: 1 - memory: "1 GiB" - returnCodes: "*" - #@ except: RuntimeSectionKeys - cromwell: {} - #@ except: RuntimeSectionKeys - miniwdl: {} - } -} diff --git a/wdl-lint/tests/lints/runtime-keys-multiple-runtime-sections/source.errors b/wdl-lint/tests/lints/runtime-keys-multiple-runtime-sections/source.errors index 7276cde0..b7f9e75d 100755 --- a/wdl-lint/tests/lints/runtime-keys-multiple-runtime-sections/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-multiple-runtime-sections/source.errors @@ -1,33 +1,33 @@ note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.1 specification: `container` - ┌─ tests/lints/runtime-keys-multiple-runtime-sections/source.wdl:11:5 + ┌─ tests/lints/runtime-keys-multiple-runtime-sections/source.wdl:12:5 │ -11 │ ╭ runtime { -12 │ │ foo: "bar" # these items should be processed and flagged. -13 │ │ baz: "quux" -14 │ │ } +12 │ ╭ runtime { +13 │ │ foo: "bar" # these items should be processed and flagged. +14 │ │ baz: "quux" +15 │ │ } │ ╰─────^ │ = fix: include an entry for the `container` key in the `runtime` section warning[RuntimeSectionKeys]: the following runtime keys are not reserved in the WDL v1.1 specification: `baz` and `foo`; therefore, their inclusion in the `runtime` section is deprecated - ┌─ tests/lints/runtime-keys-multiple-runtime-sections/source.wdl:11:5 + ┌─ tests/lints/runtime-keys-multiple-runtime-sections/source.wdl:12:5 │ -11 │ ╭ runtime { -12 │ │ foo: "bar" # these items should be processed and flagged. +12 │ ╭ runtime { +13 │ │ foo: "bar" # these items should be processed and flagged. │ │ --- the `foo` key should be removed -13 │ │ baz: "quux" +14 │ │ baz: "quux" │ │ --- the `baz` key should be removed -14 │ │ } +15 │ │ } │ ╰─────^ │ = fix: if reserved key names were intended, correct the spelling of each key; otherwise, remove the `baz` and `foo` keys error: task `a_task_with_multiple_runtimes` contains a duplicate runtime section - ┌─ tests/lints/runtime-keys-multiple-runtime-sections/source.wdl:18:5 + ┌─ tests/lints/runtime-keys-multiple-runtime-sections/source.wdl:19:5 │ -11 │ runtime { +12 │ runtime { │ ------- first runtime section is defined here · -18 │ runtime { +19 │ runtime { │ ^^^^^^^ this runtime section is a duplicate diff --git a/wdl-lint/tests/lints/runtime-keys-multiple-runtime-sections/source.wdl b/wdl-lint/tests/lints/runtime-keys-multiple-runtime-sections/source.wdl index e28753bb..686b58cf 100644 --- a/wdl-lint/tests/lints/runtime-keys-multiple-runtime-sections/source.wdl +++ b/wdl-lint/tests/lints/runtime-keys-multiple-runtime-sections/source.wdl @@ -1,22 +1,23 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing - version 1.1 task a_task_with_multiple_runtimes { + #@ except: DescriptionMissing meta {} + command <<<>>> + output {} # The lints should only appear for this runtime. runtime { - foo: "bar" # these items should be processed and flagged. + foo: "bar" # these items should be processed and flagged. baz: "quux" } # This should be reported as a validation error with no # lint warnings. runtime { - foo: "bar" # these items should not be processed and flagged. + foo: "bar" # these items should not be processed and flagged. baz: "quux" } } diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors b/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors index a73b08b0..a4736e9b 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.errors @@ -1,28 +1,52 @@ note[RuntimeSectionKeys]: the following runtime keys are recommended by the WDL v1.0 specification: `docker` and `memory` - ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:10:5 + ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:12:5 │ -10 │ runtime {} # Two missing keys: "docker" and "memory" +12 │ runtime {} # Two missing keys: "docker" and "memory" │ ^^^^^^^^^^ │ = fix: include entries for the `docker` and `memory` keys in the `runtime` section note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.0 specification: `memory` - ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:25:5 + ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:33:5 │ -25 │ ╭ runtime { -26 │ │ docker: "foo" -27 │ │ } +33 │ ╭ runtime { +34 │ │ docker: "foo" +35 │ │ } │ ╰─────^ │ = fix: include an entry for the `memory` key in the `runtime` section +warning[ContainerValue]: container URI is missing a tag + ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:34:17 + │ +34 │ docker: "foo" + │ ^^^^^ + │ + = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) + note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.0 specification: `docker` - ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:34:5 + ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:45:5 │ -34 │ ╭ runtime { -35 │ │ memory: "foo" -36 │ │ } +45 │ ╭ runtime { +46 │ │ memory: "foo" +47 │ │ } │ ╰─────^ │ = fix: include an entry for the `docker` key in the `runtime` section +warning[ContainerValue]: container URI is missing a tag + ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:58:17 + │ +58 │ docker: "foo" + │ ^^^^^ + │ + = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) + +warning[ContainerValue]: container URI is missing a tag + ┌─ tests/lints/runtime-keys-wdl-1.0/source.wdl:71:17 + │ +71 │ docker: "foo" + │ ^^^^^ + │ + = fix: add a tag to the container URI (e.g., `ubuntu@sha256:foobar` instead of `ubuntu`) + diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.wdl b/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.wdl index e607b1fe..4ec095ee 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.wdl +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.0/source.wdl @@ -1,27 +1,35 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, ContainerValue #@ except: DescriptionMissing version 1.0 task a_task_with_no_keys { meta {} + command <<<>>> + output {} - runtime {} # Two missing keys: "docker" and "memory" + + runtime {} # Two missing keys: "docker" and "memory" } task a_task_with_excepted_runtime { meta {} + command <<<>>> + output {} + #@ except: RuntimeSectionKeys - runtime {} # Errors should be ignored + runtime {} # Errors should be ignored } task a_task_with_only_the_docker_key { meta {} + command <<<>>> + output {} + runtime { docker: "foo" } @@ -29,8 +37,11 @@ task a_task_with_only_the_docker_key { task a_task_with_only_the_memory_key { meta {} + command <<<>>> + output {} + runtime { memory: "foo" } @@ -38,8 +49,11 @@ task a_task_with_only_the_memory_key { task a_task_with_both { meta {} + command <<<>>> + output {} + runtime { docker: "foo" memory: "bar" @@ -48,11 +62,14 @@ task a_task_with_both { task a_task_with_extra_keys_but_no_errors { meta {} + command <<<>>> + output {} + runtime { docker: "foo" memory: "bar" - baz: "quux" # this should not throw an error + baz: "quux" # this should not throw an error } } diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors b/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors index 5a40db35..1311778f 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.errors @@ -1,39 +1,39 @@ note[RuntimeSectionKeys]: the following runtime key is recommended by the WDL v1.1 specification: `container` - ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:10:5 + ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:12:5 │ -10 │ runtime {} # Missing every recommended runtime key, so many keys should be +12 │ runtime {} # Missing `container` key │ ^^^^^^^^^^ │ = fix: include an entry for the `container` key in the `runtime` section warning[RuntimeSectionKeys]: the following runtime key is not reserved in the WDL v1.1 specification: `foo`; therefore, its inclusion in the `runtime` section is deprecated - ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:42:5 + ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:51:5 │ -42 │ ╭ runtime { -43 │ │ container: "ubuntu" -44 │ │ cpu: 1 -45 │ │ memory: "2 GiB" +51 │ ╭ runtime { +52 │ │ container: "ubuntu" +53 │ │ cpu: 1 +54 │ │ memory: "2 GiB" · │ -50 │ │ foo: "bar" +59 │ │ foo: "bar" │ │ --- the `foo` key should be removed -51 │ │ } +60 │ │ } │ ╰─────^ │ = fix: if a reserved key name was intended, correct the spelling; otherwise, remove the `foo` key warning[RuntimeSectionKeys]: the following runtime keys are not reserved in the WDL v1.1 specification: `baz` and `foo`; therefore, their inclusion in the `runtime` section is deprecated - ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:58:5 + ┌─ tests/lints/runtime-keys-wdl-1.1/source.wdl:70:5 │ -58 │ ╭ runtime { -59 │ │ container: "ubuntu" -60 │ │ cpu: 1 -61 │ │ memory: "2 GiB" +70 │ ╭ runtime { +71 │ │ container: "ubuntu" +72 │ │ cpu: 1 +73 │ │ memory: "2 GiB" · │ -66 │ │ foo: "bar" +78 │ │ foo: "bar" │ │ --- the `foo` key should be removed -67 │ │ baz: "quux" +79 │ │ baz: "quux" │ │ --- the `baz` key should be removed -68 │ │ } +80 │ │ } │ ╰─────^ │ = fix: if reserved key names were intended, correct the spelling of each key; otherwise, remove the `baz` and `foo` keys diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.wdl b/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.wdl index 60206a52..6f5567e6 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.wdl +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.1/source.wdl @@ -1,27 +1,33 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, ContainerValue -#@ except: DescriptionMissing, MissingRequirements +#@ except: DescriptionMissing, ContainerValue version 1.1 task a_task_with_no_keys { meta {} + command <<<>>> + output {} - runtime {} # Missing every recommended runtime key, so many keys should be - # flagged here. + + runtime {} # Missing `container` key } task a_task_with_no_keys_but_they_are_excepted { meta {} + command <<<>>> + output {} + #@ except: RuntimeSectionKeys - runtime {} # No errors should show. + runtime {} # No errors should show. } task a_task_with_all_keys { meta {} + command <<<>>> + output {} runtime { @@ -37,8 +43,11 @@ task a_task_with_all_keys { task a_task_with_one_extra_key { meta {} + command <<<>>> + output {} + runtime { container: "ubuntu" cpu: 1 @@ -53,8 +62,11 @@ task a_task_with_one_extra_key { task a_task_with_two_extra_keys { meta {} + command <<<>>> + output {} + runtime { container: "ubuntu" cpu: 1 diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.errors b/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.errors index e69de29b..8f3bd47e 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.errors @@ -0,0 +1,24 @@ +note[Todo]: remaining `TODO` item found + ┌─ tests/lints/runtime-keys-wdl-1.2/source.wdl:1:4 + │ +1 │ ## TODO: A strange one: this emits two errors, both from MissingRequiremnts. + │ ^^^^ + │ + = fix: implement this todo item and remove the `TODO` statement + +warning[MissingRequirements]: task `a_task_with_no_keys` is missing a `requirements` section + ┌─ tests/lints/runtime-keys-wdl-1.2/source.wdl:5:6 + │ +5 │ task a_task_with_no_keys { + │ ^^^^^^^^^^^^^^^^^^^ this task is missing a `requirements` section + │ + = fix: add a `requirements` section to the task + +note[MissingRequirements]: task `a_task_with_no_keys` contains a deprecated `runtime` section + ┌─ tests/lints/runtime-keys-wdl-1.2/source.wdl:13:5 + │ +13 │ runtime {} + │ ^^^^^^^^^^ + │ + = fix: replace the `runtime` section with a `requirements` section + diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.wdl b/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.wdl index 859dde90..78e9c378 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.wdl +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.wdl @@ -1,12 +1,14 @@ -#@ except: BlankLinesBetweenElements, CommentWhitespace, DescriptionMissing -#@ except: MissingRequirements +## TODO: A strange one: this emits two errors, both from MissingRequiremnts. version 1.2 task a_task_with_no_keys { + #@ except: DescriptionMissing meta {} + command <<<>>> + output {} - runtime {} # This should not throw any errors for the runtime keys rule, - # as the `runtime` section was deprecated in WDL v1.2. + + runtime {} } diff --git a/wdl-lint/tests/lints/section-ordering/source.wdl b/wdl-lint/tests/lints/section-ordering/source.wdl index 95568dae..d19ef11e 100644 --- a/wdl-lint/tests/lints/section-ordering/source.wdl +++ b/wdl-lint/tests/lints/section-ordering/source.wdl @@ -1,5 +1,5 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, MissingRuntime, MissingOutput -#@ except: MissingRequirements +#@ except: MissingRequirements, DescriptionMissing, MissingRuntime, MissingOutput +#@ except: BlankLinesBetweenElements version 1.2 diff --git a/wdl-lint/tests/lints/snake-case/source.errors b/wdl-lint/tests/lints/snake-case/source.errors index 0d76f016..83a47352 100644 --- a/wdl-lint/tests/lints/snake-case/source.errors +++ b/wdl-lint/tests/lints/snake-case/source.errors @@ -1,18 +1,18 @@ warning[SnakeCase]: workflow name `BadWorkflow` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:7:10 + ┌─ tests/lints/snake-case/source.wdl:5:10 │ -7 │ workflow BadWorkflow { +5 │ workflow BadWorkflow { │ ^^^^^^^^^^^ this name must be snake_case │ = fix: replace `BadWorkflow` with `bad_workflow` warning[SnakeCase]: private declaration name `badPrivateDecl` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:10:11 - │ -10 │ Float badPrivateDecl = 3.14 - │ ^^^^^^^^^^^^^^ this name must be snake_case - │ - = fix: replace `badPrivateDecl` with `bad_private_decl` + ┌─ tests/lints/snake-case/source.wdl:8:11 + │ +8 │ Float badPrivateDecl = 3.14 + │ ^^^^^^^^^^^^^^ this name must be snake_case + │ + = fix: replace `badPrivateDecl` with `bad_private_decl` warning[SnakeCase]: task name `BadTask` is not snake_case ┌─ tests/lints/snake-case/source.wdl:15:6 @@ -23,25 +23,25 @@ warning[SnakeCase]: task name `BadTask` is not snake_case = fix: replace `BadTask` with `bad_task` warning[SnakeCase]: input name `BadInput` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:19:16 + ┌─ tests/lints/snake-case/source.wdl:24:16 │ -19 │ String BadInput +24 │ String BadInput │ ^^^^^^^^ this name must be snake_case │ = fix: replace `BadInput` with `bad_input` warning[SnakeCase]: output name `badOut` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:32:14 + ┌─ tests/lints/snake-case/source.wdl:33:14 │ -32 │ File badOut = "out.txt" +33 │ File badOut = "out.txt" │ ^^^^^^ this name must be snake_case │ = fix: replace `badOut` with `bad_out` warning[SnakeCase]: struct member name `bAdFiElD` is not snake_case - ┌─ tests/lints/snake-case/source.wdl:61:12 + ┌─ tests/lints/snake-case/source.wdl:67:12 │ -61 │ String bAdFiElD # unfortunately, `convert-case` doesn't understand sarcasm case +67 │ String bAdFiElD # unfortunately, `convert-case` doesn't understand sarcasm case │ ^^^^^^^^ this name must be snake_case │ = fix: replace `bAdFiElD` with `b_ad_fi_el_d` diff --git a/wdl-lint/tests/lints/snake-case/source.wdl b/wdl-lint/tests/lints/snake-case/source.wdl index ef86a096..34510b89 100644 --- a/wdl-lint/tests/lints/snake-case/source.wdl +++ b/wdl-lint/tests/lints/snake-case/source.wdl @@ -1,58 +1,64 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing, LineWidth, NonmatchingOutput, SectionOrdering, RuntimeSectionKeys - -## Test SnakeCase rule +#@ except: DescriptionMissing, NonmatchingOutput, RuntimeSectionKeys version 1.0 workflow BadWorkflow { meta {} - output {} + Float badPrivateDecl = 3.14 call BadTask call good_task + + output {} } task BadTask { meta {} - input { - String BadInput - Int other_bad_input = 13 - } - parameter_meta { BadInput: "not a good input" other_bad_input: "also not a good input" } + input { + String BadInput + Int other_bad_input = 13 + } + command <<< echo "Hello World" >>> + output { File badOut = "out.txt" } + runtime {} } task good_task { meta {} - Array[Int] good_private_decl = [1, 2, 3] - input { - String good_input - Int other_good_input = 42 - } parameter_meta { good_input: "a good input" other_good_input: "also a good input" } + input { + String good_input + Int other_good_input = 42 + } + + Array[Int] good_private_decl = [1, 2, 3] + command <<< echo "Hello World" >>> + output { File good_out = "out.txt" } + runtime {} } diff --git a/wdl-lint/tests/lints/struct-matching-param-meta/source.errors b/wdl-lint/tests/lints/struct-matching-param-meta/source.errors index f8edc871..075b78ad 100644 --- a/wdl-lint/tests/lints/struct-matching-param-meta/source.errors +++ b/wdl-lint/tests/lints/struct-matching-param-meta/source.errors @@ -1,15 +1,15 @@ warning[MatchingParameterMeta]: struct `Text` is missing a parameter metadata key for input `does_not_exist` - ┌─ tests/lints/struct-matching-param-meta/source.wdl:10:12 - │ -10 │ String does_not_exist - │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section - │ - = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. + ┌─ tests/lints/struct-matching-param-meta/source.wdl:8:12 + │ +8 │ String does_not_exist + │ ^^^^^^^^^^^^^^ this input does not have an entry in the parameter metadata section + │ + = fix: add a `does_not_exist` key to the `parameter_meta` section with a detailed description of the input. note[MatchingParameterMeta]: struct `Text` has an extraneous parameter metadata key named `extra` - ┌─ tests/lints/struct-matching-param-meta/source.wdl:25:9 + ┌─ tests/lints/struct-matching-param-meta/source.wdl:23:9 │ -25 │ extra: "this should not be here" +23 │ extra: "this should not be here" │ ^^^^^ this key does not correspond to any input declaration │ = fix: remove the extraneous parameter metadata entry diff --git a/wdl-lint/tests/lints/struct-matching-param-meta/source.wdl b/wdl-lint/tests/lints/struct-matching-param-meta/source.wdl index 08cf7cc0..20615671 100644 --- a/wdl-lint/tests/lints/struct-matching-param-meta/source.wdl +++ b/wdl-lint/tests/lints/struct-matching-param-meta/source.wdl @@ -1,5 +1,3 @@ -#@ except: TrailingComma - ## This is a test for checking for missing and extraneous entries ## in a `parameter_meta` section for a struct. @@ -19,8 +17,8 @@ struct Text { foo: { bar: { does_not_exist: "this should not suppress a missing input lint" - } - } + }, + }, } extra: "this should not be here" } diff --git a/wdl-lint/tests/lints/todo/source.wdl b/wdl-lint/tests/lints/todo/source.wdl index 34bb76dc..fac62a6a 100644 --- a/wdl-lint/tests/lints/todo/source.wdl +++ b/wdl-lint/tests/lints/todo/source.wdl @@ -1,6 +1,6 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing +#@ except: DescriptionMissing -## This is a test of the todo rule. +## This is a test of the Todo rule. version 1.1 @@ -9,18 +9,18 @@ version 1.1 workflow test { # This should be flagged (TODO). - #@ except: Todo meta { - # TODO: this should NOT be flagged either + # TODO: this should NOT be flagged } + output {} } #@ except: Todo workflow test { # TODO: This should NOT be flagged as well. - meta {} + output {} } diff --git a/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors b/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors index a2233d43..08b02b98 100644 --- a/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors +++ b/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors @@ -1,12 +1,12 @@ note[PreambleFormatting]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/too-many-pounds-preamble/source.wdl:3:1 + ┌─ tests/lints/too-many-pounds-preamble/source.wdl:1:1 │ -3 │ ### This comment has too many pound signs! +1 │ ### This comment has too many pound signs! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note[PreambleFormatting]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/too-many-pounds-preamble/source.wdl:5:1 + ┌─ tests/lints/too-many-pounds-preamble/source.wdl:3:1 │ -5 │ ###### This comment also has too many pound signs! +3 │ ###### This comment also has too many pound signs! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/wdl-lint/tests/lints/too-many-pounds-preamble/source.wdl b/wdl-lint/tests/lints/too-many-pounds-preamble/source.wdl index 275d41fa..0957dcec 100644 --- a/wdl-lint/tests/lints/too-many-pounds-preamble/source.wdl +++ b/wdl-lint/tests/lints/too-many-pounds-preamble/source.wdl @@ -1,5 +1,3 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - ### This comment has too many pound signs! ## This one is fine though. ###### This comment also has too many pound signs! @@ -7,6 +5,8 @@ version 1.1 workflow test { + #@ except: DescriptionMissing meta {} + output {} } diff --git a/wdl-lint/tests/lints/trailing-comma/source.errors b/wdl-lint/tests/lints/trailing-comma/source.errors index 7fb0b11c..a16b62af 100644 --- a/wdl-lint/tests/lints/trailing-comma/source.errors +++ b/wdl-lint/tests/lints/trailing-comma/source.errors @@ -1,96 +1,96 @@ note[TrailingComma]: extraneous whitespace and/or comments before trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:12:29 + ┌─ tests/lints/trailing-comma/source.wdl:14:29 │ -12 │ modify_memory_gb = 2 # some other junk +14 │ modify_memory_gb = 2 # some other junk │ ╭─────────────────────────────^ -13 │ │ , +15 │ │ , │ ╰────────^ │ = fix: remove this extraneous content note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:25:9 + ┌─ tests/lints/trailing-comma/source.wdl:27:9 │ -25 │ not_an_option = "test" +27 │ not_an_option = "test" │ ^^^^^^^^^^^^^^^^^^^^^^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:36:13 + ┌─ tests/lints/trailing-comma/source.wdl:38:13 │ -36 │ other: "another" # missing comma +38 │ other: "another" # missing comma │ ^^^^^^^^^^^^^^^^ │ = fix: add a comma after this element note[TrailingComma]: extraneous whitespace and/or comments before trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:40:24 + ┌─ tests/lints/trailing-comma/source.wdl:42:24 │ -40 │ baz: "quux" , # misplaced comma +42 │ baz: "quux" , # misplaced comma │ ^ │ = fix: remove this extraneous content note[TrailingComma]: extraneous whitespace and/or comments before trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:48:24 + ┌─ tests/lints/trailing-comma/source.wdl:50:24 │ -48 │ baz: "quux" # wow this is ugly +50 │ baz: "quux" # wow this is ugly │ ╭────────────────────────^ -49 │ │ # technically legal! -50 │ │ , # comments are horrible! +51 │ │ # technically legal! +52 │ │ , # comments are horrible! │ ╰────────────^ │ = fix: remove this extraneous content note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:60:13 + ┌─ tests/lints/trailing-comma/source.wdl:62:13 │ -60 │ ╭ choices: [ -61 │ │ "yes", -62 │ │ "reverse", -63 │ │ "no" # missing comma -64 │ │ ] # missing comma +62 │ ╭ choices: [ +63 │ │ "yes", +64 │ │ "reverse", +65 │ │ "no" # missing comma +66 │ │ ] # missing comma │ ╰─────────────^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:63:17 + ┌─ tests/lints/trailing-comma/source.wdl:65:17 │ -63 │ "no" # missing comma +65 │ "no" # missing comma │ ^^^^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:68:13 + ┌─ tests/lints/trailing-comma/source.wdl:70:13 │ -68 │ common: true # missing comma +70 │ common: true # missing comma │ ^^^^^^^^^^^^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:89:13 + ┌─ tests/lints/trailing-comma/source.wdl:91:13 │ -89 │ 3 +91 │ 3 │ ^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:95:9 + ┌─ tests/lints/trailing-comma/source.wdl:97:9 │ -95 │ "c": "d" +97 │ "c": "d" │ ^^^^^^^^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:100:9 + ┌─ tests/lints/trailing-comma/source.wdl:102:9 │ -100 │ "c": "d" +102 │ "c": "d" │ ^^^^^^^^ │ = fix: add a comma after this element diff --git a/wdl-lint/tests/lints/trailing-comma/source.wdl b/wdl-lint/tests/lints/trailing-comma/source.wdl index e721b186..3d288b13 100644 --- a/wdl-lint/tests/lints/trailing-comma/source.wdl +++ b/wdl-lint/tests/lints/trailing-comma/source.wdl @@ -1,6 +1,8 @@ -#@ except: DeprecatedObject, DescriptionMissing, InputSorting, LineWidth +#@ except: DeprecatedObject, DescriptionMissing, InputSorting, Todo #@ except: MatchingParameterMeta, MissingMetas, MissingOutput, MissingRequirements +## TODO: line 110 is not emitting a BlankLinesBetweenElements error. This is a bug. + version 1.2 workflow bar { diff --git a/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors b/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors index 81fbfd48..a594ea93 100644 --- a/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors +++ b/wdl-lint/tests/lints/trailing-comment-whitespace/source.errors @@ -1,40 +1,32 @@ note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/trailing-comment-whitespace/source.wdl:1:57 + ┌─ tests/lints/trailing-comment-whitespace/source.wdl:1:37 │ -1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing - │ ^ +1 │ #@ except: BlankLinesBetweenElements + │ ^^^^^^^ │ = fix: remove this trailing whitespace -note[PreambleFormatting]: expected exactly one blank line between lint directives and preamble comments - ┌─ tests/lints/trailing-comment-whitespace/source.wdl:1:58 - │ -1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing - │ ╭─────────────────────────────────────────────────────────^ -2 │ │ ## This is a preamble comment with whitespace trailing - │ ╰^ - note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/trailing-comment-whitespace/source.wdl:2:55 + ┌─ tests/lints/trailing-comment-whitespace/source.wdl:4:55 │ -2 │ ## This is a preamble comment with whitespace trailing +4 │ ## This is a preamble comment with whitespace trailing │ ^ │ = fix: remove this trailing whitespace note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/trailing-comment-whitespace/source.wdl:6:54 + ┌─ tests/lints/trailing-comment-whitespace/source.wdl:8:54 │ -6 │ # This is a workflow comment with trailing whitespace +8 │ # This is a workflow comment with trailing whitespace │ ^ │ = fix: remove this trailing whitespace note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/trailing-comment-whitespace/source.wdl:7:65 - │ -7 │ # This is a workflow comment with a bunch of trailing whitespace - │ ^^^^^^^^^^^^^^^^^ - │ - = fix: remove this trailing whitespace + ┌─ tests/lints/trailing-comment-whitespace/source.wdl:11:34 + │ +11 │ #@ except: DescriptionMissing + │ ^^^^^^^ + │ + = fix: remove this trailing whitespace diff --git a/wdl-lint/tests/lints/trailing-comment-whitespace/source.wdl b/wdl-lint/tests/lints/trailing-comment-whitespace/source.wdl index b42e2806..cc2cbd7d 100644 --- a/wdl-lint/tests/lints/trailing-comment-whitespace/source.wdl +++ b/wdl-lint/tests/lints/trailing-comment-whitespace/source.wdl @@ -1,11 +1,14 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing +#@ except: BlankLinesBetweenElements + +## The above lint directive has trailing whitespace ## This is a preamble comment with whitespace trailing version 1.1 # This is a workflow comment with trailing whitespace -# This is a workflow comment with a bunch of trailing whitespace workflow test { + # Next is a lint directive with trailing whitespace + #@ except: DescriptionMissing meta {} parameter_meta {} output {} diff --git a/wdl-lint/tests/lints/two-eof-newline/source.wdl b/wdl-lint/tests/lints/two-eof-newline/source.wdl index bdc114bf..48c65112 100644 --- a/wdl-lint/tests/lints/two-eof-newline/source.wdl +++ b/wdl-lint/tests/lints/two-eof-newline/source.wdl @@ -1,11 +1,11 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - ## This is a test of two EOF newlines lint version 1.1 workflow test { + #@ except: DescriptionMissing meta {} + output {} } diff --git a/wdl-lint/tests/lints/unknown_rule/source.errors b/wdl-lint/tests/lints/unknown_rule/source.errors index 68c7956b..eaad8dcf 100644 --- a/wdl-lint/tests/lints/unknown_rule/source.errors +++ b/wdl-lint/tests/lints/unknown_rule/source.errors @@ -1,30 +1,8 @@ note[UnknownRule]: unknown lint rule `ThisIsNotARealRule` ┌─ tests/lints/unknown_rule/source.wdl:3:12 │ -3 │ #@ except: ThisIsNotARealRule, DescriptionMissing +3 │ #@ except: ThisIsNotARealRule, MissingMetas │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule │ = fix: remove the rule from the exception list -note[MisplacedLintDirective]: lint directive `DescriptionMissing` has no effect above workflow definition - ┌─ tests/lints/unknown_rule/source.wdl:3:32 - │ -3 │ #@ except: ThisIsNotARealRule, DescriptionMissing - │ ^^^^^^^^^^^^^^^^^^ cannot make an exception for this rule -4 │ ╭ workflow test { -5 │ │ meta {} -6 │ │ -7 │ │ output {} -8 │ │ } - │ ╰─' invalid element for this lint directive - │ - = fix: valid locations for this directive are above: version statement, metadata section - -note[DescriptionMissing]: workflow `test` is missing a description key - ┌─ tests/lints/unknown_rule/source.wdl:5:3 - │ -5 │ meta {} - │ ^^^^ - │ - = fix: add a `description` key to this meta section - diff --git a/wdl-lint/tests/lints/unknown_rule/source.wdl b/wdl-lint/tests/lints/unknown_rule/source.wdl index c73f3150..0c9b49dc 100644 --- a/wdl-lint/tests/lints/unknown_rule/source.wdl +++ b/wdl-lint/tests/lints/unknown_rule/source.wdl @@ -1,8 +1,6 @@ version 1.1 -#@ except: ThisIsNotARealRule, DescriptionMissing +#@ except: ThisIsNotARealRule, MissingMetas workflow test { - meta {} - output {} } diff --git a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors index 5d15169e..44f200b8 100644 --- a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors +++ b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.errors @@ -1,11 +1,12 @@ note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement - ┌─ tests/lints/unnecessary-preamble-ws/source.wdl:5:88 + ┌─ tests/lints/unnecessary-preamble-ws/source.wdl:1:57 │ -5 │ ## The second is for the whitespace between the end of that line to the version keyword - │ ╭───────────────────────────────────────────────────────────────────────────────────────^ -6 │ │ -7 │ │ -8 │ │ -9 │ │ version 1.1 +1 │ #@ except: BlankLinesBetweenElements, DescriptionMissing + │ ╭────────────────────────────────────────────────────────^ +2 │ │ +3 │ │ +4 │ │ +5 │ │ +6 │ │ version 1.1 │ ╰──^ diff --git a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.wdl b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.wdl index 97e23009..4a5d74c1 100644 --- a/wdl-lint/tests/lints/unnecessary-preamble-ws/source.wdl +++ b/wdl-lint/tests/lints/unnecessary-preamble-ws/source.wdl @@ -1,8 +1,5 @@ #@ except: BlankLinesBetweenElements, DescriptionMissing -## This is a test of ensuring that we print two diagnostics: -## The first is for the whitespace following the last comment -## The second is for the whitespace between the end of that line to the version keyword diff --git a/wdl-lint/tests/lints/ws-after-blank-line/source.errors b/wdl-lint/tests/lints/ws-after-blank-line/source.errors deleted file mode 100644 index 6114316f..00000000 --- a/wdl-lint/tests/lints/ws-after-blank-line/source.errors +++ /dev/null @@ -1,10 +0,0 @@ -note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement - ┌─ tests/lints/ws-after-blank-line/source.wdl:3:52 - │ -3 │ ## This is a test of whitespace after a blank line. - │ ╭───────────────────────────────────────────────────^ -4 │ │ -5 │ │ -6 │ │ version 1.1 - │ ╰^ - diff --git a/wdl-lint/tests/lints/ws-after-blank-line/source.wdl b/wdl-lint/tests/lints/ws-after-blank-line/source.wdl deleted file mode 100644 index 6bf6707c..00000000 --- a/wdl-lint/tests/lints/ws-after-blank-line/source.wdl +++ /dev/null @@ -1,11 +0,0 @@ -#@ except: BlankLinesBetweenElements, DescriptionMissing - -## This is a test of whitespace after a blank line. - - -version 1.1 - -workflow test { - meta {} - output {} -} From 8aaf40ae08f413a81da1665046772968518a3765 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 30 Sep 2024 13:03:04 -0400 Subject: [PATCH 21/30] Update Arena.toml --- Arena.toml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Arena.toml b/Arena.toml index 3bbf7f8a..8e990e71 100644 --- a/Arena.toml +++ b/Arena.toml @@ -137,7 +137,7 @@ permalink = "https://github.com/getwilds/ww-fastq-to-cram/blob/2d1e1989a57402642 [[diagnostics]] document = "getwilds/ww-fastq-to-cram:/ww-fastq-to-cram.wdl" -message = "ww-fastq-to-cram.wdl:205:1: warning[EndingNewline]: missing newline at the end of the file" +message = "ww-fastq-to-cram.wdl:205:1: note[EndingNewline]: missing newline at the end of the file" permalink = "https://github.com/getwilds/ww-fastq-to-cram/blob/2d1e1989a57402642c06d15f4b623ac66fd9ed7d/ww-fastq-to-cram.wdl/#L205" [[diagnostics]] @@ -352,17 +352,17 @@ permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697 [[diagnostics]] document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" -message = "ww-star-deseq2.wdl:126:3: warning[InputSorting]: input not sorted" +message = "ww-star-deseq2.wdl:126:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697c3f707f073177ddde7013/ww-star-deseq2.wdl/#L126" [[diagnostics]] document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" -message = "ww-star-deseq2.wdl:133:15: warning[DoubleQuotes]: string defined with single quotes" +message = "ww-star-deseq2.wdl:133:15: note[DoubleQuotes]: string defined with single quotes" permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697c3f707f073177ddde7013/ww-star-deseq2.wdl/#L133" [[diagnostics]] document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" -message = "ww-star-deseq2.wdl:134:15: warning[DoubleQuotes]: string defined with single quotes" +message = "ww-star-deseq2.wdl:134:15: note[DoubleQuotes]: string defined with single quotes" permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697c3f707f073177ddde7013/ww-star-deseq2.wdl/#L134" [[diagnostics]] @@ -752,7 +752,7 @@ permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697 [[diagnostics]] document = "getwilds/ww-star-deseq2:/ww-star-deseq2.wdl" -message = "ww-star-deseq2.wdl:7:3: warning[InputSorting]: input not sorted" +message = "ww-star-deseq2.wdl:7:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-star-deseq2/blob/6d81ede0ad963115697c3f707f073177ddde7013/ww-star-deseq2.wdl/#L7" [[diagnostics]] @@ -907,7 +907,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:18:3: warning[InputSorting]: input not sorted" +message = "ww-vc-trio.wdl:18:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L18" [[diagnostics]] @@ -1137,7 +1137,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:299:3: warning[InputSorting]: input not sorted" +message = "ww-vc-trio.wdl:299:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L299" [[diagnostics]] @@ -1207,7 +1207,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:354:3: warning[InputSorting]: input not sorted" +message = "ww-vc-trio.wdl:354:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L354" [[diagnostics]] @@ -1282,7 +1282,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:421:3: warning[InputSorting]: input not sorted" +message = "ww-vc-trio.wdl:421:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L421" [[diagnostics]] @@ -1312,7 +1312,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:457:3: warning[InputSorting]: input not sorted" +message = "ww-vc-trio.wdl:457:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L457" [[diagnostics]] @@ -1417,7 +1417,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:519:3: warning[InputSorting]: input not sorted" +message = "ww-vc-trio.wdl:519:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L519" [[diagnostics]] @@ -1477,7 +1477,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:559:3: warning[InputSorting]: input not sorted" +message = "ww-vc-trio.wdl:559:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L559" [[diagnostics]] @@ -1512,7 +1512,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:597:3: warning[InputSorting]: input not sorted" +message = "ww-vc-trio.wdl:597:3: note[InputSorting]: input not sorted" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L597" [[diagnostics]] @@ -1702,7 +1702,7 @@ permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f87 [[diagnostics]] document = "getwilds/ww-vc-trio:/ww-vc-trio.wdl" -message = "ww-vc-trio.wdl:771:2: warning[EndingNewline]: multiple empty lines at the end of file" +message = "ww-vc-trio.wdl:771:2: note[EndingNewline]: multiple empty lines at the end of file" permalink = "https://github.com/getwilds/ww-vc-trio/blob/c2c13e85efda8ac7aca7f8765fbaa7c2cacb08b2/ww-vc-trio.wdl/#L771" [[diagnostics]] From c43b4c48e9a5cc3c14dafa84a693bd999c2dc1f1 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 30 Sep 2024 13:46:39 -0400 Subject: [PATCH 22/30] Update CHANGELOG.md --- wdl-lint/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wdl-lint/CHANGELOG.md b/wdl-lint/CHANGELOG.md index b3dabd59..52e27300 100644 --- a/wdl-lint/CHANGELOG.md +++ b/wdl-lint/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +* `PreambleComments` and `PreambleWhitespace` have been refactored into 3 rules: `PreambleFormatting`, `VersionFormatting`, and `PreambleCommentAfterVersion` ([#187](https://github.com/stjude-rust-labs/wdl/pull/187)) +* test files have been cleaned up ([#187](https://github.com/stjude-rust-labs/wdl/pull/187)) +* Some `warning` diagnostics are now `note` diagnostics ([#187](https://github.com/stjude-rust-labs/wdl/pull/187)) + ### Added * Added comments to the trailing whitespace check of the `Whitespace` rule ([#177](https://github.com/stjude-rust-labs/wdl/pull/177)) From 7802c284854b50a574306a862c42c1e53d8d8afb Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Mon, 30 Sep 2024 13:46:50 -0400 Subject: [PATCH 23/30] tests: some more cleaning --- .../source.errors | 202 +++++++----------- .../blank-lines-between-elements/source.wdl | 3 + 2 files changed, 81 insertions(+), 124 deletions(-) diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors index 3c306fa8..e11960d2 100755 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors @@ -1,262 +1,216 @@ note[ImportWhitespace]: blank lines are not allowed between imports - ┌─ tests/lints/blank-lines-between-elements/source.wdl:4:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:6:1 │ -4 │ ╭ -5 │ │ import "qux" # following whitespace duplication is caught be Whitespace rule +6 │ ╭ +7 │ │ import "qux" # following whitespace duplication is caught be Whitespace rule │ ╰^ │ = fix: remove any blank lines between imports note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:7:1 - │ -7 │ ╭ -8 │ │ # test comment - │ ╰^ - │ - = fix: remove the unnecessary blank lines + ┌─ tests/lints/blank-lines-between-elements/source.wdl:9:1 + │ + 9 │ ╭ +10 │ │ # test comment + │ ╰^ + │ + = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:9:15 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:11:15 │ - 9 │ workflow foo { +11 │ workflow foo { │ ╭──────────────^ -10 │ │ -11 │ │ # This is OK (but the prior line is not). +12 │ │ +13 │ │ # This is OK (but the prior line is not). │ ╰────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:14:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:16:5 │ -14 │ parameter_meta {} +16 │ parameter_meta {} │ ^^^^^^^^^^^^^^^^^ │ = fix: add a blank line before this element note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:15:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:17:5 │ -15 │ # what about this comment? +17 │ # what about this comment? │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: add a blank line before this element note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:17:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:19:5 │ -17 │ ╭ scatter (i in ["hello", "world"]) { -18 │ │ call bar { input: s = i } -19 │ │ } +19 │ ╭ scatter (i in ["hello", "world"]) { +20 │ │ call bar { input: s = i } +21 │ │ } │ ╰─────^ │ = fix: add a blank line before this element note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:25:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:27:1 │ -25 │ ╭ -26 │ │ String q = "bar" # The following whitespace is allowable between private declarations +27 │ ╭ +28 │ │ String q = "bar" # The following whitespace is allowable between private declarations │ ╰────^ │ = fix: remove the unnecessary blank lines note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:31:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:33:1 │ -31 │ ╭ -32 │ │ call bar { input: +33 │ ╭ +34 │ │ call bar { input: │ ╰────^ │ = fix: remove the unnecessary blank lines note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:36:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:38:1 │ -36 │ ╭ -37 │ │ call bar as baz { input: +38 │ ╭ +39 │ │ call bar as baz { input: │ ╰────^ │ = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:1 │ -46 │ ╭ task bar { -47 │ │ -48 │ │ meta { +48 │ ╭ task bar { 49 │ │ +50 │ │ meta { +51 │ │ · │ -69 │ │ -70 │ │ } +71 │ │ +72 │ │ } │ ╰─^ │ = fix: add a blank line before this element note[MissingMetas]: task `bar` is missing a `parameter_meta` section - ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:6 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:6 │ -46 │ task bar { +48 │ task bar { │ ^^^ this task is missing a `parameter_meta` section │ = fix: add a `parameter_meta` section to the task warning[MissingRuntime]: task `bar` is missing a `runtime` section - ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:6 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:6 │ -46 │ task bar { +48 │ task bar { │ ^^^ this task is missing a `runtime` section │ = fix: add a `runtime` section to the task note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:46:11 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:11 │ -46 │ task bar { +48 │ task bar { │ ╭──────────^ -47 │ │ -48 │ │ meta { +49 │ │ +50 │ │ meta { │ ╰────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:11 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:50:11 │ -48 │ meta { +50 │ meta { │ ╭──────────^ -49 │ │ -50 │ │ description: "bar" +51 │ │ +52 │ │ description: "bar" │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:50:27 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:52:27 │ -50 │ description: "bar" +52 │ description: "bar" │ ╭──────────────────────────^ -51 │ │ -52 │ │ outputs: { +53 │ │ +54 │ │ outputs: { │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:53:19 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:55:19 │ -53 │ u: "u" +55 │ u: "u" │ ╭──────────────────^ -54 │ │ -55 │ │ } +56 │ │ +57 │ │ } │ ╰────────^ │ = fix: remove the blank line(s) -note[InputSorting]: input not sorted - ┌─ tests/lints/blank-lines-between-elements/source.wdl:58:5 - │ -58 │ ╭ input { -59 │ │ String s = "hello" -60 │ │ -61 │ │ String? t -62 │ │ } - │ ╰─────^ input section must be sorted - │ - = fix: sort input statements as: - String? t - String s = "hello" - -note[DisallowedInputName]: declaration identifier must be at least 3 characters - ┌─ tests/lints/blank-lines-between-elements/source.wdl:59:16 - │ -59 │ String s = "hello" - │ ^ - │ - = fix: rename the declaration to a name with at least 3 characters - note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:59:27 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:61:27 │ -59 │ String s = "hello" +61 │ String s = "hello" │ ╭──────────────────────────^ -60 │ │ -61 │ │ String? t +62 │ │ +63 │ │ String? t │ ╰────────^ │ = fix: remove the blank line(s) -note[DisallowedInputName]: declaration identifier must be at least 3 characters - ┌─ tests/lints/blank-lines-between-elements/source.wdl:61:17 - │ -61 │ String? t - │ ^ - │ - = fix: rename the declaration to a name with at least 3 characters - -note[DisallowedOutputName]: declaration identifier must be at least 3 characters - ┌─ tests/lints/blank-lines-between-elements/source.wdl:67:16 - │ -67 │ String u = "u" - │ ^ - │ - = fix: rename the declaration to a name with at least 3 characters - note[DescriptionMissing]: task `bax` is missing a description key - ┌─ tests/lints/blank-lines-between-elements/source.wdl:73:5 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:75:5 │ -73 │ meta {} +75 │ meta {} │ ^^^^ │ = fix: add a `description` key to this meta section note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:77:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:79:1 │ -77 │ ╭ -78 │ │ input {} +79 │ ╭ +80 │ │ input {} │ ╰────^ │ = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:84:14 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:87:14 │ -84 │ runtime { +87 │ runtime { │ ╭─────────────^ -85 │ │ -86 │ │ disks: "50 GB" +88 │ │ +89 │ │ disks: "50 GB" │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:87:23 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:90:23 │ -87 │ memory: "4 GB" +90 │ memory: "4 GB" │ ╭──────────────────────^ -88 │ │ -89 │ │ container: "ubuntu:latest" +91 │ │ +92 │ │ container: "ubuntu:latest" │ ╰────────^ │ = fix: remove the blank line(s) -note[ContainerValue]: container URI uses a mutable tag - ┌─ tests/lints/blank-lines-between-elements/source.wdl:89:20 - │ -89 │ container: "ubuntu:latest" - │ ^^^^^^^^^^^^^^^ - │ - = fix: replace the mutable tag with its SHA256 equivalent (e.g., `ubuntu@sha256:foobar` instead of `ubuntu:latest`) - note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:89:35 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:92:35 │ -89 │ container: "ubuntu:latest" +92 │ container: "ubuntu:latest" │ ╭──────────────────────────────────^ -90 │ │ -91 │ │ } +93 │ │ +94 │ │ } │ ╰────^ │ = fix: remove the blank line(s) diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl b/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl index e71515f7..f52b58d4 100644 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl @@ -1,3 +1,5 @@ +#@ except: InputSorting, DisallowedInputName, DisallowedOutputName + version 1.1 import "baz" # following whitespace will be caught by ImportWhitespace rule @@ -81,6 +83,7 @@ task bax { output {} + #@ except: ContainerValue runtime { disks: "50 GB" From 4a232f53bf51fdac47693c19eda3bd9897a8a951 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 1 Oct 2024 10:29:00 -0400 Subject: [PATCH 24/30] chore: remove TODO comments --- wdl-lint/src/rules/nonmatching_output.rs | 1 - wdl-lint/src/rules/preamble_formatting.rs | 1 - .../source.errors | 18 +++--- .../source.wdl | 4 +- .../lints/missing-comment-space/source.errors | 16 ++--- .../lints/missing-comment-space/source.wdl | 6 -- .../missing-requirements-block/source.errors | 10 ++-- .../missing-requirements-block/source.wdl | 3 +- .../one-line-after-version/source.errors | 10 ++-- .../lints/one-line-after-version/source.wdl | 3 - .../tests/lints/preamble-ws/source.errors | 20 +++---- wdl-lint/tests/lints/preamble-ws/source.wdl | 3 +- .../lints/runtime-keys-wdl-1.2/source.errors | 16 ++--- .../lints/runtime-keys-wdl-1.2/source.wdl | 2 - .../tests/lints/trailing-comma/source.errors | 58 +++++++++---------- .../tests/lints/trailing-comma/source.wdl | 4 +- 16 files changed, 70 insertions(+), 105 deletions(-) diff --git a/wdl-lint/src/rules/nonmatching_output.rs b/wdl-lint/src/rules/nonmatching_output.rs index 493bdc7b..5d687a1c 100755 --- a/wdl-lint/src/rules/nonmatching_output.rs +++ b/wdl-lint/src/rules/nonmatching_output.rs @@ -76,7 +76,6 @@ fn out_of_order(span: Span, output_span: Span, item_name: &str, ty: &str) -> Dia /// Creates a diagnostic for non-object `meta.outputs` entries. fn non_object_meta_outputs(span: Span, item_name: &str, ty: &str) -> Diagnostic { - // TODO: this message is way too long Diagnostic::warning(format!( "`outputs` key in `meta` section is reserved for an object with keys corresponding to \ declared `output` values. {ty} `{item_name}` has a `meta.outputs` key that is not an \ diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs index 23adace9..5fe48338 100644 --- a/wdl-lint/src/rules/preamble_formatting.rs +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -419,7 +419,6 @@ impl Visitor for PreambleFormattingRule { span.start(), usize::from(sibling.text_range().end()) - span.start(), ); - // TODO: need to track this span? } else { // Sibling should not be part of this diagnostic break; diff --git a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors index 465e55be..9d605550 100644 --- a/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors +++ b/wdl-lint/tests/lints/missing-blank-line-after-version/source.errors @@ -1,19 +1,19 @@ note[VersionFormatting]: expected exactly one blank line after the version statement - ┌─ tests/lints/missing-blank-line-after-version/source.wdl:7:12 + ┌─ tests/lints/missing-blank-line-after-version/source.wdl:5:12 │ -7 │ version 1.1 +5 │ version 1.1 │ ╭───────────^ -8 │ │ workflow test { +6 │ │ workflow test { │ ╰^ note[BlankLinesBetweenElements]: missing blank line - ┌─ tests/lints/missing-blank-line-after-version/source.wdl:8:1 + ┌─ tests/lints/missing-blank-line-after-version/source.wdl:6:1 │ - 8 │ ╭ workflow test { - 9 │ │ meta {} -10 │ │ -11 │ │ output {} -12 │ │ } + 6 │ ╭ workflow test { + 7 │ │ meta {} + 8 │ │ + 9 │ │ output {} +10 │ │ } │ ╰─^ │ = fix: add a blank line before this element diff --git a/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl b/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl index 782f6b50..cdbd61c5 100644 --- a/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl +++ b/wdl-lint/tests/lints/missing-blank-line-after-version/source.wdl @@ -1,8 +1,6 @@ -#@ except: DescriptionMissing, Todo +#@ except: DescriptionMissing ## This is a test of a missing blank line following the version statement. -## TODO: this emits two errors, one from VersionFormatting and one from -## BlankLinesBetweenElements. Only one of the errors is expected. version 1.1 workflow test { diff --git a/wdl-lint/tests/lints/missing-comment-space/source.errors b/wdl-lint/tests/lints/missing-comment-space/source.errors index 1b6caf83..2992397c 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.errors +++ b/wdl-lint/tests/lints/missing-comment-space/source.errors @@ -1,22 +1,14 @@ note[CommentWhitespace]: comment delimiter should be followed by a single space - ┌─ tests/lints/missing-comment-space/source.wdl:3:1 + ┌─ tests/lints/missing-comment-space/source.wdl:1:1 │ -3 │ ##This preamble comment is missing a space. +1 │ ##This preamble comment is missing a space. │ ^^ │ = fix: follow this comment delimiter with a single space note[PreambleFormatting]: preamble comments must start with `##` followed by a space - ┌─ tests/lints/missing-comment-space/source.wdl:3:1 + ┌─ tests/lints/missing-comment-space/source.wdl:1:1 │ -3 │ ##This preamble comment is missing a space. +1 │ ##This preamble comment is missing a space. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/missing-comment-space/source.wdl:4:3 - │ -4 │ ## - │ ^ - │ - = fix: remove this trailing whitespace - diff --git a/wdl-lint/tests/lints/missing-comment-space/source.wdl b/wdl-lint/tests/lints/missing-comment-space/source.wdl index c823b716..a1457f13 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.wdl +++ b/wdl-lint/tests/lints/missing-comment-space/source.wdl @@ -1,10 +1,4 @@ -#@ except: Todo - ##This preamble comment is missing a space. -## -## TODO: Line1 creates two diagnostics, one for CommentWhitespace and -## one for PreambleFormatting. Only one of the errors is expected. -## version 1.1 diff --git a/wdl-lint/tests/lints/missing-requirements-block/source.errors b/wdl-lint/tests/lints/missing-requirements-block/source.errors index 69c47f56..247c05ba 100644 --- a/wdl-lint/tests/lints/missing-requirements-block/source.errors +++ b/wdl-lint/tests/lints/missing-requirements-block/source.errors @@ -7,18 +7,18 @@ warning[MissingRequirements]: task `bad` is missing a `requirements` section = fix: add a `requirements` section to the task warning[MissingRequirements]: task `deprecated_runtime` is missing a `requirements` section - ┌─ tests/lints/missing-requirements-block/source.wdl:25:6 + ┌─ tests/lints/missing-requirements-block/source.wdl:24:6 │ -25 │ task deprecated_runtime { +24 │ task deprecated_runtime { │ ^^^^^^^^^^^^^^^^^^ this task is missing a `requirements` section │ = fix: add a `requirements` section to the task note[MissingRequirements]: task `deprecated_runtime` contains a deprecated `runtime` section - ┌─ tests/lints/missing-requirements-block/source.wdl:33:5 + ┌─ tests/lints/missing-requirements-block/source.wdl:32:5 │ -33 │ ╭ runtime { -34 │ │ } +32 │ ╭ runtime { +33 │ │ } │ ╰─────^ │ = fix: replace the `runtime` section with a `requirements` section diff --git a/wdl-lint/tests/lints/missing-requirements-block/source.wdl b/wdl-lint/tests/lints/missing-requirements-block/source.wdl index cb0e5cda..b76d788b 100644 --- a/wdl-lint/tests/lints/missing-requirements-block/source.wdl +++ b/wdl-lint/tests/lints/missing-requirements-block/source.wdl @@ -1,4 +1,4 @@ -#@ except: DescriptionMissing, Todo +#@ except: DescriptionMissing version 1.2 @@ -21,7 +21,6 @@ task good { } } -# TODO: This emits two diagnostics but should only emit one. task deprecated_runtime { meta {} diff --git a/wdl-lint/tests/lints/one-line-after-version/source.errors b/wdl-lint/tests/lints/one-line-after-version/source.errors index ae11a82d..09e50adb 100644 --- a/wdl-lint/tests/lints/one-line-after-version/source.errors +++ b/wdl-lint/tests/lints/one-line-after-version/source.errors @@ -1,14 +1,14 @@ error: there must be at least one task, workflow, or struct definition in the file - ┌─ tests/lints/one-line-after-version/source.wdl:9:1 + ┌─ tests/lints/one-line-after-version/source.wdl:6:1 │ -9 │ +6 │ │ note[VersionFormatting]: expected exactly one blank line after the version statement - ┌─ tests/lints/one-line-after-version/source.wdl:8:12 + ┌─ tests/lints/one-line-after-version/source.wdl:5:12 │ -8 │ version 1.1 +5 │ version 1.1 │ ╭───────────^ -9 │ │ +6 │ │ │ ╰^ diff --git a/wdl-lint/tests/lints/one-line-after-version/source.wdl b/wdl-lint/tests/lints/one-line-after-version/source.wdl index 4a3c6a3f..b1decdac 100644 --- a/wdl-lint/tests/lints/one-line-after-version/source.wdl +++ b/wdl-lint/tests/lints/one-line-after-version/source.wdl @@ -1,8 +1,5 @@ -#@ except: Todo - ## This is a test of having just a single line after a version ## There should only be a single diagnostic in the output about ## needing a task/workflow/struct. -## TODO: There is an "extra" daignostic emitted. Fix this. version 1.1 diff --git a/wdl-lint/tests/lints/preamble-ws/source.errors b/wdl-lint/tests/lints/preamble-ws/source.errors index f74b700e..46db72b0 100644 --- a/wdl-lint/tests/lints/preamble-ws/source.errors +++ b/wdl-lint/tests/lints/preamble-ws/source.errors @@ -1,30 +1,30 @@ note[PreambleFormatting]: unnecessary whitespace in document preamble ┌─ tests/lints/preamble-ws/source.wdl:1:1 │ -1 │ #@ except: DescriptionMissing, Todo +1 │ #@ except: DescriptionMissing │ ^^^^ note[CommentWhitespace]: in-line comments should be preceded by two spaces ┌─ tests/lints/preamble-ws/source.wdl:1:5 │ -1 │ #@ except: DescriptionMissing, Todo - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 │ #@ except: DescriptionMissing + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: this comment must be preceded with two spaces note[PreambleFormatting]: expected exactly one blank line between lint directives and preamble comments - ┌─ tests/lints/preamble-ws/source.wdl:1:40 + ┌─ tests/lints/preamble-ws/source.wdl:1:34 │ -1 │ #@ except: DescriptionMissing, Todo - │ ╭───────────────────────────────────────^ +1 │ #@ except: DescriptionMissing + │ ╭─────────────────────────────────^ 2 │ │ ## This is a test of both missing and extraneous preamble whitespace. │ ╰^ note[VersionFormatting]: expected exactly one blank line between the last comment and the version statement - ┌─ tests/lints/preamble-ws/source.wdl:3:72 + ┌─ tests/lints/preamble-ws/source.wdl:2:70 │ -3 │ ## TODO: "Extra" diagnostic from CommentWhitespace should be addressed. - │ ╭───────────────────────────────────────────────────────────────────────^ -4 │ │ version 1.1 +2 │ ## This is a test of both missing and extraneous preamble whitespace. + │ ╭─────────────────────────────────────────────────────────────────────^ +3 │ │ version 1.1 │ ╰────────^ diff --git a/wdl-lint/tests/lints/preamble-ws/source.wdl b/wdl-lint/tests/lints/preamble-ws/source.wdl index 0850dcb0..f3cd489a 100644 --- a/wdl-lint/tests/lints/preamble-ws/source.wdl +++ b/wdl-lint/tests/lints/preamble-ws/source.wdl @@ -1,6 +1,5 @@ - #@ except: DescriptionMissing, Todo + #@ except: DescriptionMissing ## This is a test of both missing and extraneous preamble whitespace. -## TODO: "Extra" diagnostic from CommentWhitespace should be addressed. version 1.1 workflow text { diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.errors b/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.errors index 8f3bd47e..8cf5571a 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.errors +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.errors @@ -1,23 +1,15 @@ -note[Todo]: remaining `TODO` item found - ┌─ tests/lints/runtime-keys-wdl-1.2/source.wdl:1:4 - │ -1 │ ## TODO: A strange one: this emits two errors, both from MissingRequiremnts. - │ ^^^^ - │ - = fix: implement this todo item and remove the `TODO` statement - warning[MissingRequirements]: task `a_task_with_no_keys` is missing a `requirements` section - ┌─ tests/lints/runtime-keys-wdl-1.2/source.wdl:5:6 + ┌─ tests/lints/runtime-keys-wdl-1.2/source.wdl:3:6 │ -5 │ task a_task_with_no_keys { +3 │ task a_task_with_no_keys { │ ^^^^^^^^^^^^^^^^^^^ this task is missing a `requirements` section │ = fix: add a `requirements` section to the task note[MissingRequirements]: task `a_task_with_no_keys` contains a deprecated `runtime` section - ┌─ tests/lints/runtime-keys-wdl-1.2/source.wdl:13:5 + ┌─ tests/lints/runtime-keys-wdl-1.2/source.wdl:11:5 │ -13 │ runtime {} +11 │ runtime {} │ ^^^^^^^^^^ │ = fix: replace the `runtime` section with a `requirements` section diff --git a/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.wdl b/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.wdl index 78e9c378..3f6ae051 100644 --- a/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.wdl +++ b/wdl-lint/tests/lints/runtime-keys-wdl-1.2/source.wdl @@ -1,5 +1,3 @@ -## TODO: A strange one: this emits two errors, both from MissingRequiremnts. - version 1.2 task a_task_with_no_keys { diff --git a/wdl-lint/tests/lints/trailing-comma/source.errors b/wdl-lint/tests/lints/trailing-comma/source.errors index a16b62af..7fb0b11c 100644 --- a/wdl-lint/tests/lints/trailing-comma/source.errors +++ b/wdl-lint/tests/lints/trailing-comma/source.errors @@ -1,96 +1,96 @@ note[TrailingComma]: extraneous whitespace and/or comments before trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:14:29 + ┌─ tests/lints/trailing-comma/source.wdl:12:29 │ -14 │ modify_memory_gb = 2 # some other junk +12 │ modify_memory_gb = 2 # some other junk │ ╭─────────────────────────────^ -15 │ │ , +13 │ │ , │ ╰────────^ │ = fix: remove this extraneous content note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:27:9 + ┌─ tests/lints/trailing-comma/source.wdl:25:9 │ -27 │ not_an_option = "test" +25 │ not_an_option = "test" │ ^^^^^^^^^^^^^^^^^^^^^^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:38:13 + ┌─ tests/lints/trailing-comma/source.wdl:36:13 │ -38 │ other: "another" # missing comma +36 │ other: "another" # missing comma │ ^^^^^^^^^^^^^^^^ │ = fix: add a comma after this element note[TrailingComma]: extraneous whitespace and/or comments before trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:42:24 + ┌─ tests/lints/trailing-comma/source.wdl:40:24 │ -42 │ baz: "quux" , # misplaced comma +40 │ baz: "quux" , # misplaced comma │ ^ │ = fix: remove this extraneous content note[TrailingComma]: extraneous whitespace and/or comments before trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:50:24 + ┌─ tests/lints/trailing-comma/source.wdl:48:24 │ -50 │ baz: "quux" # wow this is ugly +48 │ baz: "quux" # wow this is ugly │ ╭────────────────────────^ -51 │ │ # technically legal! -52 │ │ , # comments are horrible! +49 │ │ # technically legal! +50 │ │ , # comments are horrible! │ ╰────────────^ │ = fix: remove this extraneous content note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:62:13 + ┌─ tests/lints/trailing-comma/source.wdl:60:13 │ -62 │ ╭ choices: [ -63 │ │ "yes", -64 │ │ "reverse", -65 │ │ "no" # missing comma -66 │ │ ] # missing comma +60 │ ╭ choices: [ +61 │ │ "yes", +62 │ │ "reverse", +63 │ │ "no" # missing comma +64 │ │ ] # missing comma │ ╰─────────────^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:65:17 + ┌─ tests/lints/trailing-comma/source.wdl:63:17 │ -65 │ "no" # missing comma +63 │ "no" # missing comma │ ^^^^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:70:13 + ┌─ tests/lints/trailing-comma/source.wdl:68:13 │ -70 │ common: true # missing comma +68 │ common: true # missing comma │ ^^^^^^^^^^^^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:91:13 + ┌─ tests/lints/trailing-comma/source.wdl:89:13 │ -91 │ 3 +89 │ 3 │ ^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:97:9 + ┌─ tests/lints/trailing-comma/source.wdl:95:9 │ -97 │ "c": "d" +95 │ "c": "d" │ ^^^^^^^^ │ = fix: add a comma after this element note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/trailing-comma/source.wdl:102:9 + ┌─ tests/lints/trailing-comma/source.wdl:100:9 │ -102 │ "c": "d" +100 │ "c": "d" │ ^^^^^^^^ │ = fix: add a comma after this element diff --git a/wdl-lint/tests/lints/trailing-comma/source.wdl b/wdl-lint/tests/lints/trailing-comma/source.wdl index 3d288b13..a2e6234d 100644 --- a/wdl-lint/tests/lints/trailing-comma/source.wdl +++ b/wdl-lint/tests/lints/trailing-comma/source.wdl @@ -1,8 +1,6 @@ -#@ except: DeprecatedObject, DescriptionMissing, InputSorting, Todo +#@ except: DeprecatedObject, DescriptionMissing, InputSorting #@ except: MatchingParameterMeta, MissingMetas, MissingOutput, MissingRequirements -## TODO: line 110 is not emitting a BlankLinesBetweenElements error. This is a bug. - version 1.2 workflow bar { From 2b97046c0f78077ac86e8cd81718d61f38e2ab33 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 1 Oct 2024 10:32:04 -0400 Subject: [PATCH 25/30] Apply suggestions from code review Co-authored-by: Peter Huene --- wdl-lint/src/rules/preamble_comment_after_version.rs | 2 +- wdl-lint/src/rules/preamble_formatting.rs | 4 ++-- wdl-lint/src/rules/version_formatting.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wdl-lint/src/rules/preamble_comment_after_version.rs b/wdl-lint/src/rules/preamble_comment_after_version.rs index 6d66908e..99a0ca9e 100644 --- a/wdl-lint/src/rules/preamble_comment_after_version.rs +++ b/wdl-lint/src/rules/preamble_comment_after_version.rs @@ -26,7 +26,7 @@ fn preamble_comment_outside_preamble(span: Span) -> Diagnostic { } /// A lint rule for flagging preamble comments which are outside the preamble. -#[derive(Default, Debug, Clone)] +#[derive(Default, Debug, Clone, Copy)] pub struct PreambleCommentAfterVersionRule { /// Exited the preamble. exited_preamble: bool, diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs index 5fe48338..38a963a7 100644 --- a/wdl-lint/src/rules/preamble_formatting.rs +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -92,7 +92,7 @@ enum PreambleState { /// A struct that tracks the last processed preamble comment, whitespace, and /// lint directive. -#[derive(Default, Debug, Clone)] +#[derive(Default, Debug, Clone, Copy)] struct LastProcessed { /// The last lint directive. lint_directive: Option, @@ -111,7 +111,7 @@ enum ExtendDiagnostic { } /// Detects incorrect comments in a document preamble. -#[derive(Default, Debug, Clone)] +#[derive(Default, Debug, Clone, Copy)] pub struct PreambleFormattingRule { /// The current state of preamble processing. state: PreambleState, diff --git a/wdl-lint/src/rules/version_formatting.rs b/wdl-lint/src/rules/version_formatting.rs index 7e50de0b..b07f9633 100644 --- a/wdl-lint/src/rules/version_formatting.rs +++ b/wdl-lint/src/rules/version_formatting.rs @@ -60,7 +60,7 @@ fn unexpected_whitespace_inside_version(span: Span) -> Diagnostic { } /// Detects incorrect formatting of the version statement. -#[derive(Default, Debug, Clone)] +#[derive(Default, Debug, Clone, Copy)] pub struct VersionFormattingRule; impl Rule for VersionFormattingRule { From a0c541d635f0cb491da1f660da8452fe569a54db Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 1 Oct 2024 11:45:43 -0400 Subject: [PATCH 26/30] Apply review feedback --- wdl-lint/src/rules/version_formatting.rs | 3 +- .../between-import-whitespace/source.errors | 8 -- .../between-import-whitespace/source.wdl | 2 +- .../source.errors | 106 +++++++----------- .../blank-lines-between-elements/source.wdl | 2 + .../tests/lints/input-spacing/source.errors | 14 +-- wdl-lint/tests/lints/input-spacing/source.wdl | 2 +- .../tests/lints/key-value-pairs/source.errors | 42 +++---- .../tests/lints/key-value-pairs/source.wdl | 8 +- .../tests/lints/only-whitespace/source.errors | 16 +-- .../tests/lints/only-whitespace/source.wdl | 1 + 11 files changed, 72 insertions(+), 132 deletions(-) diff --git a/wdl-lint/src/rules/version_formatting.rs b/wdl-lint/src/rules/version_formatting.rs index b07f9633..16987486 100644 --- a/wdl-lint/src/rules/version_formatting.rs +++ b/wdl-lint/src/rules/version_formatting.rs @@ -73,8 +73,7 @@ impl Rule for VersionFormattingRule { } fn explanation(&self) -> &'static str { - "The version statement should be formatted correctly. This rule checks that the version \ - statement is correctly formatted." + "The version statement should be formatted correctly. This rule checks that the version statement is followed by a blank line and that there is exactly one space between 'version' and the version number. It also checks that if there are comments before the version statement, they are separated by exactly one blank line. If there are no comments, there should be no whitespace before the version statement." } fn tags(&self) -> TagSet { diff --git a/wdl-lint/tests/lints/between-import-whitespace/source.errors b/wdl-lint/tests/lints/between-import-whitespace/source.errors index 3e45338f..68f5b710 100644 --- a/wdl-lint/tests/lints/between-import-whitespace/source.errors +++ b/wdl-lint/tests/lints/between-import-whitespace/source.errors @@ -51,11 +51,3 @@ note[Whitespace]: more than one blank line in a row │ = fix: remove the unnecessary blank lines -note[Whitespace]: line contains only whitespace - ┌─ tests/lints/between-import-whitespace/source.wdl:24:1 - │ -24 │ - │ ^^^^ - │ - = fix: remove the whitespace from this line - diff --git a/wdl-lint/tests/lints/between-import-whitespace/source.wdl b/wdl-lint/tests/lints/between-import-whitespace/source.wdl index 518446ad..c2f2f353 100644 --- a/wdl-lint/tests/lints/between-import-whitespace/source.wdl +++ b/wdl-lint/tests/lints/between-import-whitespace/source.wdl @@ -21,6 +21,6 @@ import "zam.wdl" # 2 blanks will be caught be a _different_ check workflow test { #@ except: DescriptionMissing meta {} - + output {} } diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors index e11960d2..51826d51 100755 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.errors +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.errors @@ -82,135 +82,105 @@ note[Whitespace]: more than one blank line in a row note[BlankLinesBetweenElements]: missing blank line ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:1 - │ -48 │ ╭ task bar { -49 │ │ -50 │ │ meta { -51 │ │ - · │ -71 │ │ -72 │ │ } - │ ╰─^ - │ - = fix: add a blank line before this element - -note[MissingMetas]: task `bar` is missing a `parameter_meta` section - ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:6 - │ -48 │ task bar { - │ ^^^ this task is missing a `parameter_meta` section - │ - = fix: add a `parameter_meta` section to the task - -warning[MissingRuntime]: task `bar` is missing a `runtime` section - ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:6 │ -48 │ task bar { - │ ^^^ this task is missing a `runtime` section +48 │ #@ except: MissingMetas, MissingRuntime + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ - = fix: add a `runtime` section to the task + = fix: add a blank line before this element note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:48:11 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:49:11 │ -48 │ task bar { +49 │ task bar { │ ╭──────────^ -49 │ │ -50 │ │ meta { +50 │ │ +51 │ │ meta { │ ╰────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:50:11 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:51:11 │ -50 │ meta { +51 │ meta { │ ╭──────────^ -51 │ │ -52 │ │ description: "bar" +52 │ │ +53 │ │ description: "bar" │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:52:27 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:53:27 │ -52 │ description: "bar" +53 │ description: "bar" │ ╭──────────────────────────^ -53 │ │ -54 │ │ outputs: { +54 │ │ +55 │ │ outputs: { │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:55:19 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:56:19 │ -55 │ u: "u" +56 │ u: "u" │ ╭──────────────────^ -56 │ │ -57 │ │ } +57 │ │ +58 │ │ } │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:61:27 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:62:27 │ -61 │ String s = "hello" +62 │ String s = "hello" │ ╭──────────────────────────^ -62 │ │ -63 │ │ String? t +63 │ │ +64 │ │ String? t │ ╰────────^ │ = fix: remove the blank line(s) -note[DescriptionMissing]: task `bax` is missing a description key - ┌─ tests/lints/blank-lines-between-elements/source.wdl:75:5 - │ -75 │ meta {} - │ ^^^^ - │ - = fix: add a `description` key to this meta section - note[Whitespace]: more than one blank line in a row - ┌─ tests/lints/blank-lines-between-elements/source.wdl:79:1 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:81:1 │ -79 │ ╭ -80 │ │ input {} +81 │ ╭ +82 │ │ input {} │ ╰────^ │ = fix: remove the unnecessary blank lines note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:87:14 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:89:14 │ -87 │ runtime { +89 │ runtime { │ ╭─────────────^ -88 │ │ -89 │ │ disks: "50 GB" +90 │ │ +91 │ │ disks: "50 GB" │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:90:23 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:92:23 │ -90 │ memory: "4 GB" +92 │ memory: "4 GB" │ ╭──────────────────────^ -91 │ │ -92 │ │ container: "ubuntu:latest" +93 │ │ +94 │ │ container: "ubuntu:latest" │ ╰────────^ │ = fix: remove the blank line(s) note[BlankLinesBetweenElements]: extra blank line(s) found - ┌─ tests/lints/blank-lines-between-elements/source.wdl:92:35 + ┌─ tests/lints/blank-lines-between-elements/source.wdl:94:35 │ -92 │ container: "ubuntu:latest" +94 │ container: "ubuntu:latest" │ ╭──────────────────────────────────^ -93 │ │ -94 │ │ } +95 │ │ +96 │ │ } │ ╰────^ │ = fix: remove the blank line(s) diff --git a/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl b/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl index f52b58d4..bd4e6a4e 100644 --- a/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl +++ b/wdl-lint/tests/lints/blank-lines-between-elements/source.wdl @@ -45,6 +45,7 @@ workflow foo { output {} } +#@ except: MissingMetas, MissingRuntime task bar { meta { @@ -72,6 +73,7 @@ task bar { } task bax { + #@ except: DescriptionMissing meta {} parameter_meta {} diff --git a/wdl-lint/tests/lints/input-spacing/source.errors b/wdl-lint/tests/lints/input-spacing/source.errors index 54612b8f..4825180a 100644 --- a/wdl-lint/tests/lints/input-spacing/source.errors +++ b/wdl-lint/tests/lints/input-spacing/source.errors @@ -27,7 +27,7 @@ note[CallInputSpacing]: call input keyword not properly spaced note[CallInputSpacing]: call inputs assignments must be surrounded with whitespace ┌─ tests/lints/input-spacing/source.wdl:20:10 │ -20 │ a="something", b="somethingelse" +20 │ a="something", b="somethingelse", │ ^ │ = fix: surround '=' with whitespace on each side @@ -35,23 +35,15 @@ note[CallInputSpacing]: call inputs assignments must be surrounded with whitespa note[CallInputSpacing]: call inputs must be separated by newline ┌─ tests/lints/input-spacing/source.wdl:20:24 │ -20 │ a="something", b="somethingelse" +20 │ a="something", b="somethingelse", │ ^^^^^^^^^^^^^^^^^ │ = fix: add newline before the input -note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/input-spacing/source.wdl:20:24 - │ -20 │ a="something", b="somethingelse" - │ ^^^^^^^^^^^^^^^^^ - │ - = fix: add a comma after this element - note[CallInputSpacing]: call inputs assignments must be surrounded with whitespace ┌─ tests/lints/input-spacing/source.wdl:20:25 │ -20 │ a="something", b="somethingelse" +20 │ a="something", b="somethingelse", │ ^ │ = fix: surround '=' with whitespace on each side diff --git a/wdl-lint/tests/lints/input-spacing/source.wdl b/wdl-lint/tests/lints/input-spacing/source.wdl index 45de3f93..f15e2ba4 100644 --- a/wdl-lint/tests/lints/input-spacing/source.wdl +++ b/wdl-lint/tests/lints/input-spacing/source.wdl @@ -17,7 +17,7 @@ workflow foo { call bar as ba call bar as ba2 {input: - a="something", b="somethingelse" + a="something", b="somethingelse", } call bar as ba3 { input: a = "something"} diff --git a/wdl-lint/tests/lints/key-value-pairs/source.errors b/wdl-lint/tests/lints/key-value-pairs/source.errors index 23f9dbd2..f8ae007c 100644 --- a/wdl-lint/tests/lints/key-value-pairs/source.errors +++ b/wdl-lint/tests/lints/key-value-pairs/source.errors @@ -11,7 +11,7 @@ note[KeyValuePairs]: incorrect indentation │ 8 │ another_key: ["value1", │ ╭───────────────────────────────^ -9 │ │ "value2", "value3"] +9 │ │ "value2", "value3",] │ ╰────────^ │ = fix: add 4 spaces to indentation @@ -19,7 +19,7 @@ note[KeyValuePairs]: incorrect indentation note[KeyValuePairs]: item should be followed by a newline ┌─ tests/lints/key-value-pairs/source.wdl:9:9 │ -9 │ "value2", "value3"] +9 │ "value2", "value3",] │ ^^^^^^^^^ │ = fix: add a newline after this element @@ -27,19 +27,11 @@ note[KeyValuePairs]: item should be followed by a newline note[KeyValuePairs]: item should be followed by a newline ┌─ tests/lints/key-value-pairs/source.wdl:9:19 │ -9 │ "value2", "value3"] - │ ^^^^^^^^ +9 │ "value2", "value3",] + │ ^^^^^^^^^ │ = fix: add a newline after this element -note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/key-value-pairs/source.wdl:9:19 - │ -9 │ "value2", "value3"] - │ ^^^^^^^^ - │ - = fix: add a comma after this element - note[KeyValuePairs]: item should be followed by a newline ┌─ tests/lints/key-value-pairs/source.wdl:10:19 │ @@ -91,7 +83,7 @@ note[KeyValuePairs]: item should be followed by a newline note[KeyValuePairs]: item should be followed by a newline ┌─ tests/lints/key-value-pairs/source.wdl:20:17 │ -20 │ "m", "n"], +20 │ "m", "n",], │ ^^^^ │ = fix: add a newline after this element @@ -99,19 +91,11 @@ note[KeyValuePairs]: item should be followed by a newline note[KeyValuePairs]: item should be followed by a newline ┌─ tests/lints/key-value-pairs/source.wdl:20:22 │ -20 │ "m", "n"], - │ ^^^ +20 │ "m", "n",], + │ ^^^^ │ = fix: add a newline after this element -note[TrailingComma]: item missing trailing comma - ┌─ tests/lints/key-value-pairs/source.wdl:20:22 - │ -20 │ "m", "n"], - │ ^^^ - │ - = fix: add a comma after this element - note[KeyValuePairs]: item should be followed by a newline ┌─ tests/lints/key-value-pairs/source.wdl:21:16 │ @@ -131,24 +115,24 @@ note[KeyValuePairs]: incorrect indentation note[TrailingComma]: item missing trailing comma ┌─ tests/lints/key-value-pairs/source.wdl:34:13 │ -34 │ choices: ["yes", "reverse", "no"] - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +34 │ choices: ["yes", "reverse", "no",] + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: add a comma after this element note[KeyValuePairs]: all items in an array or object should be on separate lines ┌─ tests/lints/key-value-pairs/source.wdl:34:22 │ -34 │ choices: ["yes", "reverse", "no"] - │ ^^^^^^^^^^^^^^^^^^^^^^^^ +34 │ choices: ["yes", "reverse", "no",] + │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: move each item to a new line note[KeyValuePairs]: all items in an array or object should be on separate lines ┌─ tests/lints/key-value-pairs/source.wdl:36:19 │ -36 │ minaqual: {description: "Skip all reads with alignment quality lower than the given minimum value", common: true} - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +36 │ minaqual: {description: "Skip all reads with alignment quality lower than the given minimum value", common: true,} + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = fix: move each item to a new line diff --git a/wdl-lint/tests/lints/key-value-pairs/source.wdl b/wdl-lint/tests/lints/key-value-pairs/source.wdl index a39df73b..34dbc7c5 100644 --- a/wdl-lint/tests/lints/key-value-pairs/source.wdl +++ b/wdl-lint/tests/lints/key-value-pairs/source.wdl @@ -6,7 +6,7 @@ task foo { meta { description: "test for key-value pairs" another_key: ["value1", - "value2", "value3"] + "value2", "value3",] more_key: {d: "a", e: "b",} complex_key: { @@ -17,7 +17,7 @@ task foo { i: "j", }, k: ["l", - "m", "n"], + "m", "n",], o: ["p", "q", "r", @@ -31,9 +31,9 @@ task foo { strandedness: { description: "Strandedness protocol of the RNA-Seq experiment", external_help: "https://htseq.readthedocs.io/en/latest/htseqcount.html#cmdoption-htseq-count-s", - choices: ["yes", "reverse", "no"] + choices: ["yes", "reverse", "no",] } - minaqual: {description: "Skip all reads with alignment quality lower than the given minimum value", common: true} + minaqual: {description: "Skip all reads with alignment quality lower than the given minimum value", common: true,} modify_memory_gb: "Add to or subtract from dynamic memory allocation. Default memory is determined by the size of the inputs. Specified in GB." modify_disk_size_gb: "Add to or subtract from dynamic disk space allocation. Default disk size is determined by the size of the inputs. Specified in GB." } diff --git a/wdl-lint/tests/lints/only-whitespace/source.errors b/wdl-lint/tests/lints/only-whitespace/source.errors index b56e7ff7..7a005a94 100644 --- a/wdl-lint/tests/lints/only-whitespace/source.errors +++ b/wdl-lint/tests/lints/only-whitespace/source.errors @@ -34,33 +34,33 @@ note[Whitespace]: line contains trailing whitespace = fix: remove this trailing whitespace note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/only-whitespace/source.wdl:13:34 + ┌─ tests/lints/only-whitespace/source.wdl:14:34 │ -13 │ #@ except: DescriptionMissing +14 │ #@ except: DescriptionMissing │ ^^^^^^^^ │ = fix: remove this trailing whitespace note[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:15:1 + ┌─ tests/lints/only-whitespace/source.wdl:16:1 │ -15 │ +16 │ │ ^^^^ │ = fix: remove the whitespace from this line note[Whitespace]: line contains trailing whitespace - ┌─ tests/lints/only-whitespace/source.wdl:18:18 + ┌─ tests/lints/only-whitespace/source.wdl:19:18 │ -18 │ String x = "" +19 │ String x = "" │ ^^^^^^^^^^^ │ = fix: remove this trailing whitespace note[Whitespace]: line contains only whitespace - ┌─ tests/lints/only-whitespace/source.wdl:22:1 + ┌─ tests/lints/only-whitespace/source.wdl:23:1 │ -22 │ +23 │ │ ^^^^^ │ = fix: remove the whitespace from this line diff --git a/wdl-lint/tests/lints/only-whitespace/source.wdl b/wdl-lint/tests/lints/only-whitespace/source.wdl index f0f600c3..8a06041f 100644 --- a/wdl-lint/tests/lints/only-whitespace/source.wdl +++ b/wdl-lint/tests/lints/only-whitespace/source.wdl @@ -10,6 +10,7 @@ version 1.1 workflow test { + # lines above and below have trailing whitespace #@ except: DescriptionMissing meta {} From 14f1a3135b9a261042c0d0e23b0ec12bf02702c5 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 1 Oct 2024 11:47:16 -0400 Subject: [PATCH 27/30] chore: cargo fmt --- wdl-lint/src/rules/version_formatting.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wdl-lint/src/rules/version_formatting.rs b/wdl-lint/src/rules/version_formatting.rs index 16987486..cc506cda 100644 --- a/wdl-lint/src/rules/version_formatting.rs +++ b/wdl-lint/src/rules/version_formatting.rs @@ -73,7 +73,11 @@ impl Rule for VersionFormattingRule { } fn explanation(&self) -> &'static str { - "The version statement should be formatted correctly. This rule checks that the version statement is followed by a blank line and that there is exactly one space between 'version' and the version number. It also checks that if there are comments before the version statement, they are separated by exactly one blank line. If there are no comments, there should be no whitespace before the version statement." + "The version statement should be formatted correctly. This rule checks that the version \ + statement is followed by a blank line and that there is exactly one space between \ + 'version' and the version number. It also checks that if there are comments before the \ + version statement, they are separated by exactly one blank line. If there are no \ + comments, there should be no whitespace before the version statement." } fn tags(&self) -> TagSet { From bd920dc4695fb4e4862b5bd14e3f7b56b7caf3da Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 1 Oct 2024 12:07:08 -0400 Subject: [PATCH 28/30] fix: simplify logic --- wdl-lint/src/rules/preamble_formatting.rs | 47 +++++++---------------- 1 file changed, 14 insertions(+), 33 deletions(-) diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs index 38a963a7..41317ec2 100644 --- a/wdl-lint/src/rules/preamble_formatting.rs +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -9,7 +9,6 @@ use wdl_ast::EXCEPT_COMMENT_PREFIX; use wdl_ast::Span; use wdl_ast::SupportedVersion; use wdl_ast::SyntaxKind; -use wdl_ast::ToSpan; use wdl_ast::VersionStatement; use wdl_ast::VisitReason; use wdl_ast::Visitor; @@ -90,16 +89,6 @@ enum PreambleState { Finished, } -/// A struct that tracks the last processed preamble comment, whitespace, and -/// lint directive. -#[derive(Default, Debug, Clone, Copy)] -struct LastProcessed { - /// The last lint directive. - lint_directive: Option, - /// The last preamble comment. - preamble_comment: Option, -} - /// An enum that represents the type of diagnostic to extend. enum ExtendDiagnostic { /// Extend a lint directive diagnostic. @@ -115,8 +104,8 @@ enum ExtendDiagnostic { pub struct PreambleFormattingRule { /// The current state of preamble processing. state: PreambleState, - /// The last processed preamble comment, whitespace, and lint directive. - last_processed: LastProcessed, + /// Whether the preamble comment block has been finished. + preamble_comment_block_finished: bool, /// The number of comment tokens to skip. /// /// This is used to skip comments that were consolidated in a prior @@ -277,22 +266,22 @@ impl Visitor for PreambleFormattingRule { } }; - // Don't include the newline separating the previous comment from the - // whitespace - let offset = if s.starts_with("\r\n") { - 2 - } else if s.starts_with('\n') { - 1 - } else { - 0 - }; - let span = whitespace.span(); if expect_single_blank { if s != "\r\n\r\n" && s != "\n\n" { state.add(expected_blank_line_before_preamble_comment(span)); } } else if s != "\r\n" && s != "\n" { + // Don't include the newline separating the previous comment from the + // leading whitespace + let offset = if s.starts_with("\r\n") { + 2 + } else if s.starts_with('\n') { + 1 + } else { + 0 + }; + state.add(unnecessary_whitespace(Span::new( span.start() + offset, span.len() - offset, @@ -329,33 +318,28 @@ impl Visitor for PreambleFormattingRule { } else if self.state == PreambleState::Start { if lint_directive { self.state = PreambleState::LintDirectiveBlock; - self.last_processed.lint_directive = Some(comment.span()); } if preamble_comment { self.state = PreambleState::PreambleCommentBlock; - self.last_processed.preamble_comment = Some(comment.span()); } return; } else if self.state == PreambleState::LintDirectiveBlock { if lint_directive { - self.last_processed.lint_directive = Some(comment.span()); return; } if preamble_comment { - if self.last_processed.preamble_comment.is_some() { + if self.preamble_comment_block_finished { // Preamble block has already been processed. This is an error. extend = Some(ExtendDiagnostic::PreambleComment); } else { // We are switching from the lint directive block to the preamble comment block // Whitespace will be handled by the whitespace visitor. self.state = PreambleState::PreambleCommentBlock; - self.last_processed.preamble_comment = Some(comment.span()); return; } } } else if self.state == PreambleState::PreambleCommentBlock { if preamble_comment { - self.last_processed.preamble_comment = Some(comment.span()); return; } if lint_directive { @@ -385,8 +369,6 @@ impl Visitor for PreambleFormattingRule { span.start(), usize::from(sibling.text_range().end()) - span.start(), ); - self.last_processed.lint_directive = - Some(sibling.text_range().to_span()); } else { // Sibling should not be part of this diagnostic break; @@ -402,10 +384,9 @@ impl Visitor for PreambleFormattingRule { span.start(), usize::from(sibling.text_range().end()) - span.start(), ); - self.last_processed.preamble_comment = - Some(sibling.text_range().to_span()); } else { // Sibling should not be part of this diagnostic + self.preamble_comment_block_finished = true; break; } } From 0310ae9ae1cc9f3d6939edd9721f66e3b15cbadc Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 1 Oct 2024 12:20:58 -0400 Subject: [PATCH 29/30] fix: simplify logic --- wdl-lint/src/rules/preamble_formatting.rs | 43 ++----------------- .../source.errors | 14 ++++++ .../source.wdl | 19 ++++++++ 3 files changed, 37 insertions(+), 39 deletions(-) create mode 100644 wdl-lint/tests/lints/alternate-preamble-directive-comments/source.errors create mode 100644 wdl-lint/tests/lints/alternate-preamble-directive-comments/source.wdl diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs index 41317ec2..cbb3b7d2 100644 --- a/wdl-lint/src/rules/preamble_formatting.rs +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -28,13 +28,6 @@ fn invalid_preamble_comment(span: Span) -> Diagnostic { .with_highlight(span) } -/// Creates a "preamble comment before directive" diagnostic. -fn preamble_comment_before_directive(span: Span) -> Diagnostic { - Diagnostic::note("preamble comments must come after lint directives") - .with_rule(ID) - .with_highlight(span) -} - /// Creates a "directive after preamble comment" diagnostic. fn directive_after_preamble_comment(span: Span) -> Diagnostic { Diagnostic::note("lint directives must come before preamble comments") @@ -93,8 +86,6 @@ enum PreambleState { enum ExtendDiagnostic { /// Extend a lint directive diagnostic. LintDirective, - /// Extend a preamble comment diagnostic. - PreambleComment, /// Extend an invalid comment diagnostic. InvalidComment, } @@ -104,8 +95,6 @@ enum ExtendDiagnostic { pub struct PreambleFormattingRule { /// The current state of preamble processing. state: PreambleState, - /// Whether the preamble comment block has been finished. - preamble_comment_block_finished: bool, /// The number of comment tokens to skip. /// /// This is used to skip comments that were consolidated in a prior @@ -328,15 +317,10 @@ impl Visitor for PreambleFormattingRule { return; } if preamble_comment { - if self.preamble_comment_block_finished { - // Preamble block has already been processed. This is an error. - extend = Some(ExtendDiagnostic::PreambleComment); - } else { - // We are switching from the lint directive block to the preamble comment block - // Whitespace will be handled by the whitespace visitor. - self.state = PreambleState::PreambleCommentBlock; - return; - } + // We are switching from the lint directive block to the preamble comment block + // Whitespace will be handled by the whitespace visitor. + self.state = PreambleState::PreambleCommentBlock; + return; } } else if self.state == PreambleState::PreambleCommentBlock { if preamble_comment { @@ -374,22 +358,6 @@ impl Visitor for PreambleFormattingRule { break; } } - Some(ExtendDiagnostic::PreambleComment) => { - if sibling_is_preamble_comment { - // As we're processing this sibling comment here, increment the skip - // count - self.skip_count += 1; - - span = Span::new( - span.start(), - usize::from(sibling.text_range().end()) - span.start(), - ); - } else { - // Sibling should not be part of this diagnostic - self.preamble_comment_block_finished = true; - break; - } - } Some(ExtendDiagnostic::InvalidComment) => { if !sibling_is_lint_directive && !sibling_is_preamble_comment { // As we're processing this sibling comment here, increment the skip @@ -426,9 +394,6 @@ impl Visitor for PreambleFormattingRule { Some(ExtendDiagnostic::LintDirective) => { state.add(directive_after_preamble_comment(span)); } - Some(ExtendDiagnostic::PreambleComment) => { - state.add(preamble_comment_before_directive(span)); - } Some(ExtendDiagnostic::InvalidComment) => { state.add(invalid_preamble_comment(span)); } diff --git a/wdl-lint/tests/lints/alternate-preamble-directive-comments/source.errors b/wdl-lint/tests/lints/alternate-preamble-directive-comments/source.errors new file mode 100644 index 00000000..fbfc5e2c --- /dev/null +++ b/wdl-lint/tests/lints/alternate-preamble-directive-comments/source.errors @@ -0,0 +1,14 @@ +note[PreambleFormatting]: lint directives must come before preamble comments + ┌─ tests/lints/alternate-preamble-directive-comments/source.wdl:3:1 + │ +3 │ ╭ #@ except: UnknownRule +4 │ │ #@ except: Foo + │ ╰──────────────^ + +note[PreambleFormatting]: lint directives must come before preamble comments + ┌─ tests/lints/alternate-preamble-directive-comments/source.wdl:8:1 + │ +8 │ ╭ #@ except: Bar +9 │ │ #@ except: Baz + │ ╰──────────────^ + diff --git a/wdl-lint/tests/lints/alternate-preamble-directive-comments/source.wdl b/wdl-lint/tests/lints/alternate-preamble-directive-comments/source.wdl new file mode 100644 index 00000000..2838ca16 --- /dev/null +++ b/wdl-lint/tests/lints/alternate-preamble-directive-comments/source.wdl @@ -0,0 +1,19 @@ +## Start with a preamble comment +## Let's make that two preamble comments +#@ except: UnknownRule +#@ except: Foo + +## Back to preamble comment +## And another +#@ except: Bar +#@ except: Baz + +## One more preamble comment. For good luck! +## Not done yet! + +version 1.1 + +struct A { + Int x + Int y +} From 7108954d939de8d49ab7342ccf05c6fed7b6ee56 Mon Sep 17 00:00:00 2001 From: Andrew Frantz Date: Tue, 1 Oct 2024 12:32:21 -0400 Subject: [PATCH 30/30] chore: clarify lint message --- wdl-lint/src/rules/preamble_formatting.rs | 31 ++++++++++--------- .../invalid-preamble-comment/source.errors | 4 +-- .../lints/missing-comment-space/source.errors | 2 +- .../source.errors | 2 +- .../too-many-pounds-preamble/source.errors | 4 +-- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/wdl-lint/src/rules/preamble_formatting.rs b/wdl-lint/src/rules/preamble_formatting.rs index cbb3b7d2..c9d82dd7 100644 --- a/wdl-lint/src/rules/preamble_formatting.rs +++ b/wdl-lint/src/rules/preamble_formatting.rs @@ -23,9 +23,12 @@ const ID: &str = "PreambleFormatting"; /// Creates an "invalid preamble comment" diagnostic. fn invalid_preamble_comment(span: Span) -> Diagnostic { - Diagnostic::note("preamble comments must start with `##` followed by a space") - .with_rule(ID) - .with_highlight(span) + Diagnostic::note( + "preamble comments must start with `##` and have at least one space between the `##` and \ + the comment text", + ) + .with_rule(ID) + .with_highlight(span) } /// Creates a "directive after preamble comment" diagnostic. @@ -36,19 +39,12 @@ fn directive_after_preamble_comment(span: Span) -> Diagnostic { } /// Creates an "unnecessary whitespace" diagnostic. -fn unnecessary_whitespace(span: Span) -> Diagnostic { +fn leading_whitespace(span: Span) -> Diagnostic { Diagnostic::note("unnecessary whitespace in document preamble") .with_rule(ID) .with_highlight(span) } -/// Creates an "expected a blank line before" diagnostic. -fn expected_blank_line_before_version(span: Span) -> Diagnostic { - Diagnostic::note("expected exactly one blank line before the version statement") - .with_rule(ID) - .with_highlight(span) -} - /// Creates an "expected a blank line before preamble comment" diagnostic. fn expected_blank_line_before_preamble_comment(span: Span) -> Diagnostic { Diagnostic::note( @@ -58,6 +54,13 @@ fn expected_blank_line_before_preamble_comment(span: Span) -> Diagnostic { .with_highlight(span) } +/// Creates an "expected a blank line before" diagnostic. +fn expected_blank_line_before_version(span: Span) -> Diagnostic { + Diagnostic::note("expected exactly one blank line before the version statement") + .with_rule(ID) + .with_highlight(span) +} + /// Detects if a comment is a lint directive. fn is_lint_directive(text: &str) -> bool { text.starts_with(EXCEPT_COMMENT_PREFIX) @@ -271,7 +274,7 @@ impl Visitor for PreambleFormattingRule { 0 }; - state.add(unnecessary_whitespace(Span::new( + state.add(leading_whitespace(Span::new( span.start() + offset, span.len() - offset, ))); @@ -280,7 +283,7 @@ impl Visitor for PreambleFormattingRule { } } else { // Whitespace is not allowed to start the document. - state.add(unnecessary_whitespace(whitespace.span())); + state.add(leading_whitespace(whitespace.span())); } } @@ -317,8 +320,6 @@ impl Visitor for PreambleFormattingRule { return; } if preamble_comment { - // We are switching from the lint directive block to the preamble comment block - // Whitespace will be handled by the whitespace visitor. self.state = PreambleState::PreambleCommentBlock; return; } diff --git a/wdl-lint/tests/lints/invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/invalid-preamble-comment/source.errors index 7cc593a1..67e3cbfa 100644 --- a/wdl-lint/tests/lints/invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/invalid-preamble-comment/source.errors @@ -1,10 +1,10 @@ -note[PreambleFormatting]: preamble comments must start with `##` followed by a space +note[PreambleFormatting]: preamble comments must start with `##` and have at least one space between the `##` and the comment text ┌─ tests/lints/invalid-preamble-comment/source.wdl:1:1 │ 1 │ # This is an invalid preamble comment. │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note[PreambleFormatting]: preamble comments must start with `##` followed by a space +note[PreambleFormatting]: preamble comments must start with `##` and have at least one space between the `##` and the comment text ┌─ tests/lints/invalid-preamble-comment/source.wdl:3:1 │ 3 │ ╭ # This one is invalid too! diff --git a/wdl-lint/tests/lints/missing-comment-space/source.errors b/wdl-lint/tests/lints/missing-comment-space/source.errors index 2992397c..6f7549d4 100644 --- a/wdl-lint/tests/lints/missing-comment-space/source.errors +++ b/wdl-lint/tests/lints/missing-comment-space/source.errors @@ -6,7 +6,7 @@ note[CommentWhitespace]: comment delimiter should be followed by a single space │ = fix: follow this comment delimiter with a single space -note[PreambleFormatting]: preamble comments must start with `##` followed by a space +note[PreambleFormatting]: preamble comments must start with `##` and have at least one space between the `##` and the comment text ┌─ tests/lints/missing-comment-space/source.wdl:1:1 │ 1 │ ##This preamble comment is missing a space. diff --git a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors index 0ead7fcf..dd9bcbac 100644 --- a/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors +++ b/wdl-lint/tests/lints/one-invalid-preamble-comment/source.errors @@ -1,4 +1,4 @@ -note[PreambleFormatting]: preamble comments must start with `##` followed by a space +note[PreambleFormatting]: preamble comments must start with `##` and have at least one space between the `##` and the comment text ┌─ tests/lints/one-invalid-preamble-comment/source.wdl:1:1 │ 1 │ ╭ # This is a test of having one big invalid preamble comment. diff --git a/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors b/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors index 08b02b98..a429d10b 100644 --- a/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors +++ b/wdl-lint/tests/lints/too-many-pounds-preamble/source.errors @@ -1,10 +1,10 @@ -note[PreambleFormatting]: preamble comments must start with `##` followed by a space +note[PreambleFormatting]: preamble comments must start with `##` and have at least one space between the `##` and the comment text ┌─ tests/lints/too-many-pounds-preamble/source.wdl:1:1 │ 1 │ ### This comment has too many pound signs! │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note[PreambleFormatting]: preamble comments must start with `##` followed by a space +note[PreambleFormatting]: preamble comments must start with `##` and have at least one space between the `##` and the comment text ┌─ tests/lints/too-many-pounds-preamble/source.wdl:3:1 │ 3 │ ###### This comment also has too many pound signs!