From 6cb84a182918e1079ed63389cfae1a0cf0fdbea9 Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Mon, 20 Jan 2020 15:11:23 +0100 Subject: [PATCH] Remove TODOs and FIXMEs that we are not going to fix Change-Id: I588d9e8f74247adcb26ecdc14b49cf8056291a2e --- src/AnchorFormatter.php | 1 - src/Cite.php | 10 ---------- src/ReferenceStack.php | 3 +-- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/AnchorFormatter.php b/src/AnchorFormatter.php index a845a6558..e0a15a51d 100644 --- a/src/AnchorFormatter.php +++ b/src/AnchorFormatter.php @@ -32,7 +32,6 @@ class AnchorFormatter { * @return string A key for use in wikitext */ public function refKey( string $key, string $num = null ) : string { - // FIXME: Move the message to 'cite_ref_link_*' $prefix = $this->messageLocalizer->msg( 'cite_reference_link_prefix' )->text(); $suffix = $this->messageLocalizer->msg( 'cite_reference_link_suffix' )->text(); if ( $num !== null ) { diff --git a/src/Cite.php b/src/Cite.php index aa4044b4b..1c2f5d3aa 100644 --- a/src/Cite.php +++ b/src/Cite.php @@ -236,9 +236,6 @@ class Cite { return StatusValue::newFatal( 'cite_error_included_ref' ); } - // TODO: Assert things such as $text is different than existing ref with $name, - // currently done in `pushRef`. - return StatusValue::newGood(); } @@ -254,10 +251,6 @@ class Cite { string $group, ?string $name ) : StatusValue { - // FIXME: Some assertions make assumptions that rely on earlier tests not failing. - // These dependencies need to be explicit so they aren't accidentally broken by - // reordering in the future, or made more robust to initial conditions. - if ( $group !== $this->inReferencesGroup ) { // and have conflicting group attributes. return StatusValue::newFatal( 'cite_error_references_group_mismatch', @@ -298,9 +291,6 @@ class Cite { } /** - * TODO: Looks like this should be split into a section insensitive to context, and the - * special handling for each context. - * * @param Parser $parser * @param ?string $text Raw, untrimmed wikitext content of the tag, if any * @param string[] $argv Arguments as given in , already trimmed diff --git a/src/ReferenceStack.php b/src/ReferenceStack.php index 5f91e70b5..baa5c6a09 100644 --- a/src/ReferenceStack.php +++ b/src/ReferenceStack.php @@ -135,7 +135,6 @@ class ReferenceStack { if ( $follow && isset( $this->refs[$group][$follow] ) ) { // We know the parent note already, so just perform the "follow" and bail out - // TODO: Separate `pushRef` from these side-effects. $this->appendText( $group, $follow, ' ' . $text ); return null; } @@ -341,10 +340,10 @@ class ReferenceStack { case 'new': // Rollback the addition of new elements to the stack unset( $this->refs[$group][$lookup] ); + // TODO: Don't we need to rollback groupRefSequence and extendsCount as well? if ( !$this->refs[$group] ) { $this->popGroup( $group ); } - // TODO: else, don't we need to decrement groupRefSequence? break; case 'new-from-placeholder': $this->refs[$group][$lookup]['__placeholder__'] = true;