Usages of backtick inline comments spanning multiple lines breaks code navigation

Hello,

I’ve stumbled a weird bug/feature (at least did not find a way to disable it :smiley: )

The screenshot below tells the story by itself:

and pasting the code snippet itself below:

#!/bin/bash
function catWithLotsOfMultilineComments {
  local my_var_1="my_value_1 "
  local my_var_2="my_value_2 "
  local my_var_3="my_value_3 "
  local my_var_4="my_value_4 "

  echo \
    `# Comment 1` \
    "$my_var_1" \
    `# Comment 2.1` \
    `# Comment 2.2` \
    "$my_var_2" \
    `# Comment 3.1` \
    `# Comment 3.2` \
    `# Comment 3.3` \
    "$my_var_3" \
    `# Comment 4.1` \
    "$my_var_4" \
  ;
}

# Execute
catWithLotsOfMultilineComments

Not sure if this will help, but my “rig” setup:

IntelliJ IDEA 2020.1.3 (Ultimate Edition)
Build #IU-201.8538.31, built on July 7, 2020
Runtime version: 11.0.7+10-b765.64 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry: terminal.buffer.max.lines.count=90000
Non-Bundled Plugins: cn.jxzhang.plugin.json-formatter, color.scheme.GapStyle, com.alayouni.ansiHighlight, com.github.novotnyr.jwt-intellij-plugin, String Manipulation, com.intellij.ideolog, org.intellij.plugins.hcl, pro.bashsupport, org.jetbrains.plugins.vagrant, org.jetbrains.kotlin

p.s. big ups for this plugin to the creator :wink: :slight_smile:

Hi @konstantinast,
thanks for reporting and the code snippet!
The real issue here is the parsing of comments wrapped in backticks. The message about the unused local is caused by the incorrect parsing.

I’ll fix this for the next bug-fix update.

Joachim

1 Like

Fixed for the next update (1.5.14). I’m planning to release it next week.

1 Like

Version 1.5.14 with a fix is available now. Please let me know if there still are issues with your use case.

Joachim

1 Like

Sorry for the late reply - better late then never :smiley:

It looks like it was fixed :wink: Thanks.

1 Like