mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-05-30 04:34:08 +02:00
Fix some qodana inspections
This commit is contained in:
parent
2a3e96b891
commit
785f29abf8
@ -37,6 +37,7 @@
|
|||||||
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
<inspection_tool class="MissortedModifiers" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
<option name="m_requireAnnotationsFirst" value="true" />
|
<option name="m_requireAnnotationsFirst" value="true" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
|
<inspection_tool class="SameParameterValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="SameReturnValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="SameReturnValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||||
<option name="processCode" value="true" />
|
<option name="processCode" value="true" />
|
||||||
|
@ -19,4 +19,5 @@ exclude:
|
|||||||
- src/test/java/org/jetbrains/plugins/ideavim/propertybased/samples/JavaText.kt
|
- src/test/java/org/jetbrains/plugins/ideavim/propertybased/samples/JavaText.kt
|
||||||
- src/test/java/org/jetbrains/plugins/ideavim/propertybased/samples/LoremText.kt
|
- src/test/java/org/jetbrains/plugins/ideavim/propertybased/samples/LoremText.kt
|
||||||
- src/test/java/org/jetbrains/plugins/ideavim/propertybased/samples/SimpleText.kt
|
- src/test/java/org/jetbrains/plugins/ideavim/propertybased/samples/SimpleText.kt
|
||||||
- src/main/java/com/maddyhome/idea/vim/vimscript/parser/generated
|
- src/main/java/com/maddyhome/idea/vim/vimscript/parser/generated
|
||||||
|
- src/main/java/com/maddyhome/idea/vim/package-info.java
|
@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2022 The IdeaVim authors
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style
|
|
||||||
* license that can be found in the LICENSE.txt file or at
|
|
||||||
* https://opensource.org/licenses/MIT.
|
|
||||||
*/
|
|
@ -102,7 +102,6 @@ unable.to.find.0=Unable to find {0}
|
|||||||
more.ret.line.space.page.d.half.page.q.quit=-- MORE -- (RET: line, SPACE: page, d: half page, q: quit)
|
more.ret.line.space.page.d.half.page.q.quit=-- MORE -- (RET: line, SPACE: page, d: half page, q: quit)
|
||||||
hit.enter.or.type.command.to.continue=Hit ENTER or type command to continue
|
hit.enter.or.type.command.to.continue=Hit ENTER or type command to continue
|
||||||
ex.output.panel.more=-- MORE --
|
ex.output.panel.more=-- MORE --
|
||||||
command.name.vim.macro.playback=Vim Macro Playback
|
|
||||||
action.no.changes.text=No Changes
|
action.no.changes.text=No Changes
|
||||||
action.reload.text=Reload
|
action.reload.text=Reload
|
||||||
replace.with.0=Replace with {0} (y/n/a/q/l)?
|
replace.with.0=Replace with {0} (y/n/a/q/l)?
|
||||||
|
@ -173,7 +173,7 @@ abstract class VimTestCase : UsefulTestCase() {
|
|||||||
protected fun configureByText(content: String) = configureByText(PlainTextFileType.INSTANCE, content)
|
protected fun configureByText(content: String) = configureByText(PlainTextFileType.INSTANCE, content)
|
||||||
protected fun configureByJavaText(content: String) = configureByText(JavaFileType.INSTANCE, content)
|
protected fun configureByJavaText(content: String) = configureByText(JavaFileType.INSTANCE, content)
|
||||||
protected fun configureByXmlText(content: String) = configureByText(XmlFileType.INSTANCE, content)
|
protected fun configureByXmlText(content: String) = configureByText(XmlFileType.INSTANCE, content)
|
||||||
protected fun configureByJsonText(content: String) = configureByText(JsonFileType.INSTANCE, content)
|
protected fun configureByJsonText(@Suppress("SameParameterValue") content: String) = configureByText(JsonFileType.INSTANCE, content)
|
||||||
|
|
||||||
protected fun configureAndGuard(content: String) {
|
protected fun configureAndGuard(content: String) {
|
||||||
val ranges = extractBrackets(content)
|
val ranges = extractBrackets(content)
|
||||||
@ -182,7 +182,7 @@ abstract class VimTestCase : UsefulTestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun configureAndFold(content: String, placeholder: String) {
|
protected fun configureAndFold(content: String, @Suppress("SameParameterValue") placeholder: String) {
|
||||||
val ranges = extractBrackets(content)
|
val ranges = extractBrackets(content)
|
||||||
myFixture.editor.foldingModel.runBatchFoldingOperation {
|
myFixture.editor.foldingModel.runBatchFoldingOperation {
|
||||||
for ((start, end) in ranges) {
|
for ((start, end) in ranges) {
|
||||||
@ -557,7 +557,7 @@ abstract class VimTestCase : UsefulTestCase() {
|
|||||||
// Specify width in columns, not pixels, just like we do for visible screen size. The default text char width differs
|
// Specify width in columns, not pixels, just like we do for visible screen size. The default text char width differs
|
||||||
// per platform (e.g. Windows is 7, Mac is 8) so we can't guarantee correct positioning for tests if we use hard coded
|
// per platform (e.g. Windows is 7, Mac is 8) so we can't guarantee correct positioning for tests if we use hard coded
|
||||||
// pixel widths
|
// pixel widths
|
||||||
protected fun addInlay(offset: Int, relatesToPrecedingText: Boolean, widthInColumns: Int): Inlay<*> {
|
protected fun addInlay(offset: Int, relatesToPrecedingText: Boolean, @Suppress("SameParameterValue") widthInColumns: Int): Inlay<*> {
|
||||||
val widthInPixels = (EditorHelper.getPlainSpaceWidthFloat(myFixture.editor) * widthInColumns).roundToInt()
|
val widthInPixels = (EditorHelper.getPlainSpaceWidthFloat(myFixture.editor) * widthInColumns).roundToInt()
|
||||||
return EditorTestUtil.addInlay(myFixture.editor, offset, relatesToPrecedingText, widthInPixels)
|
return EditorTestUtil.addInlay(myFixture.editor, offset, relatesToPrecedingText, widthInPixels)
|
||||||
}
|
}
|
||||||
@ -566,7 +566,7 @@ abstract class VimTestCase : UsefulTestCase() {
|
|||||||
// height on all platforms, so can't guarantee correct positioning for tests if we use pixels. This currently limits
|
// height on all platforms, so can't guarantee correct positioning for tests if we use pixels. This currently limits
|
||||||
// us to integer multiples of line heights. I don't think this will cause any issues, but we can change this to a
|
// us to integer multiples of line heights. I don't think this will cause any issues, but we can change this to a
|
||||||
// float if necessary. We'd still be working scaled to the line height, so fractional values should still work.
|
// float if necessary. We'd still be working scaled to the line height, so fractional values should still work.
|
||||||
protected fun addBlockInlay(offset: Int, showAbove: Boolean, heightInRows: Int): Inlay<*> {
|
protected fun addBlockInlay(offset: Int, @Suppress("SameParameterValue") showAbove: Boolean, heightInRows: Int): Inlay<*> {
|
||||||
val widthInColumns = 10 // Arbitrary width. We don't care.
|
val widthInColumns = 10 // Arbitrary width. We don't care.
|
||||||
val widthInPixels = (EditorHelper.getPlainSpaceWidthFloat(myFixture.editor) * widthInColumns).roundToInt()
|
val widthInPixels = (EditorHelper.getPlainSpaceWidthFloat(myFixture.editor) * widthInColumns).roundToInt()
|
||||||
val heightInPixels = myFixture.editor.lineHeight * heightInRows
|
val heightInPixels = myFixture.editor.lineHeight * heightInRows
|
||||||
|
Loading…
Reference in New Issue
Block a user