question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: indent/outdent mismatch

See original GitHub issue

First: I’m very happy to find a bash beautifier. But for one of my scripts it fails with

error: indent/outdent mismatch: 1.

although I (and also “shellcheck”) didn’t find an error.

After some trail and error attempts I could reduce the problem to the following command using command substitution

T=$(echo "\"a\"")

But for e.g. putting a space before the right parenthesis let beautish work without an error!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jschleuscommented, Jan 29, 2019

I just want to confirm that the bug is fixed.

Sorry, I had have overseen it since I found no response here and after a quick look on the source of version 3.12 I had the wrong impression that the mentioned problem wasn’t yet fixed. But it was, great!

0reactions
thpryrchncommented, Jul 9, 2020

I am still getting this error!! Would be nice if the error show where it happens, like how python does when it hits an error… Here is my code that is tripping it up!

#!/bin/bash

if [[ $ext = "mov" ]]; then
    echo "ffmpeg -i \"$infile\" $ffextra1 $ffextra -metadata xmp=\"\" -c:v prores -c:a pcm_s24le -metadata:s:v:0 encoder='Apple ProRes 422' -metadata language=eng -vf $vf -aspect $aspect -y -loglevel verbose -movflags +faststart \"$outfile\""
    sleep 5
    ffmpeg -i "$infile" $ffextra1 $ffextra -metadata xmp="" -c:v prores -c:a pcm_s24le -metadata:s:v:0 encoder='Apple ProRes 422' -metadata language=eng -vf "$vf" -aspect $aspect -y -loglevel verbose "$outfile"
else
    echo "ffmpeg -i $infile $ffextra1 $ffextra -metadata xmp="" -vf $vf -y -pix_fmt yuv420p -loglevel verbose -g $gop -maxrate:v $max -bufsize:v 30M -aspect $aspect -c:v libx264 -crf $crf -x264opts ref=4:qpmin=4:colorprim=bt709:transfer=bt709:colormatrix=bt709$x264ex -movflags +faststart $outfile"
    sleep 5
    ffmpeg -i "$infile" $ffextra1 $ffextra -metadata xmp="" -vf "$vf" -y -pix_fmt yuv420p -loglevel verbose -g $gop -maxrate:v "$max" -bufsize:v 30M -aspect $aspect -c:v libx264 -crf $crf -x264opts ref=4:qpmin=4:colorprim=bt709:transfer=bt709:colormatrix=bt709$x264ex -movflags +faststart "$outfile"
fi
done
say "Upres conversion finished!"

beautysh==6.0.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Invalid Error: indent/outdent mismatch for 'block ...
I encountered invalid results. >rbeautify ident2.rb ..............ruby/lib/ruby/gems/2.2.0/gems/rbeautify-0.0.7/lib/rbeautify.rb:115: warning: character ...
Read more >
need help with indentation mismatch - Lemma Soft Forums
The problem is that your indentations are off. Your code should look like this: Code: Select all define g = Character("Girl") define b...
Read more >
Visual Studio Code: format is not using indent settings
If it is the case, then just open Command Palette, type "Formatter" and select Formatter Config . Then edit the value of "indent_size"...
Read more >
"CPU ID Mismatch" error - Windows 10 - Nodelocked licenses ...
Nodelocked licenses stop working when connecting/changing WiFi connection - "CPU ID Mismatch" error - Windows 10 Description Keysight EDA ...
Read more >
Bash Script Beautifier (Python) - * arachnoid.com
But in tests with many large Linux system Bash scripts, its error-free score was ... 129: sys.stderr.write('File %s: error: indent/outdent mismatch: %d.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found