momaek / formattag

Align Golang struct tags
35 stars 7 forks source link

goland watcher formattag background process running forever #12

Open microgiantya opened 1 year ago

microgiantya commented 1 year ago

Add custom watcher to goland according to README file: image

But after save file execution is freezes and not complete: image process in table: image

From command line works fine (good stuff!, thx).

If try a shell wrap, works fine too:

cat run.sh 
#!/bin/bash
/opt/formattag/formattag -file "$1" &

image

Any tips? Thx.

microgiantya commented 1 year ago

goland stuff

GoLand 2023.2.2
Build #GO-232.9921.53, built on September 14, 2023
Licensed to ---------------------------
Subscription is active until -----------------.
Runtime version: 17.0.8+7-b1000.22 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.2.0-33-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry:
    suggest.all.run.configurations.from.context=true
    ide.windowSystem.autoShowProcessPopup=true
    ide.completion.variant.limit=500
    ide.experimental.ui=true

Non-Bundled Plugins:
    com.github.catppuccin.jetbrains (2.2.0)
    io.eightpigs.intellij.darktheme (1.0.4)
    com.herokuapp.vuesion (1.9.2)
    club.nutsoft.Github3Theme (1.2.0)
    com.vecheslav.darculaDarkerTheme (1.2.0)
    com.tylerthrailkill.intellij.solarized (3.0.0)
    varme.pw.oceanic-dark-theme (1.1.7)
    atom-one (1.5.1)
    com.jetbrains.grayTheme (1.3)
    com.villains.intelij.plugin.newoceantheme (1.2.2)
    com.jetbrains.CyanTheme (1.3)
    IdeaVIM (2.5.1)
    com.brandiico.jetbrains-nightfall-theme (1.1.9)
    com.github.dinbtechit.vscodetheme (1.10.2)

Current Desktop: ubuntu:GNOME
microgiantya commented 1 year ago

os stuff

hostnamectl
 Static hostname: ------------
       Icon name: --------------------
         Chassis: -------------------
      Machine ID: -------------------
         Boot ID: -------------------
Operating System: Ubuntu 22.04.2 LTS              
          Kernel: Linux 6.2.0-33-generic
    Architecture: x86-64
Lewinz commented 1 year ago

I tried to replicate your error using the same version of goland on mac, but I couldn't. formattag worked fine. My configuration is as follows, I hope it can help you!

29781699582601_ pic

You can try adjusting the configuration of 'Show console'.

2Fast2BCn commented 1 year ago

It's not working for me in GoLand 2023.2.4 on windows 10 either Does work via command line prompt :-/

momaek commented 1 year ago

It's not working for me in GoLand 2023.2.4 on windows 10 either Does work via command line prompt :-/

Can you execute it from commandline?

2Fast2BCn commented 12 months ago

Yes, command line is no problem.

HerbertNatal commented 7 months ago

same here... forever executing at golang and command line work fine

miclle commented 4 months ago

https://github.com/momaek/formattag/pull/16