Skip to content

Commit

Permalink
Ignore Qodana false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
PHPirates committed Oct 21, 2024
1 parent cd255ed commit 3e78e0e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ exclude: # Some of these are valid inspections but not important or accurate eno
- name: EmptyMethod
- name: SameReturnValue
- name: UnusedProperty
- name: EditorConfigKeyCorrectness
- name: EditorConfigKeyCorrectness
- name: KotlinConstantConditions
- name: UnusedReceiverParameter
- name: RedundantNullableReturnType
- name: UselessCallOnCollection
- name: KDocUnresolvedReference
- name: KotlinDeprecation
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ open class LatexAnnotator : Annotator {
/**
* Annotates the contents of the given parameter with the given style.
*/
@Suppress("USELESS_CAST")
private fun AnnotationHolder.annotateRequiredParameter(parameter: LatexRequiredParam, style: TextAttributesKey) {
val firstContentChild = parameter.firstChildOfType(LatexContent::class)
val firstParamChild = parameter.firstChildOfType(LatexRequiredParamContent::class)
Expand Down
6 changes: 4 additions & 2 deletions src/nl/hannahsten/texifyidea/reference/LatexLabelReference.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LatexLabelReference(element: LatexCommands, range: TextRange?) : PsiRefere
(
1 + StringUtil.offsetToLineNumber(
containing.text,
bibtexEntry.getTextOffset()
bibtexEntry.textOffset
)
),
true
Expand Down Expand Up @@ -94,6 +94,8 @@ class LatexLabelReference(element: LatexCommands, range: TextRange?) : PsiRefere
init {

// Only show Ctrl+click underline under the reference name
setRangeInElement(range)
if (range != null) {
rangeInElement = range
}
}
}

0 comments on commit 3e78e0e

Please sign in to comment.