TcBlack icon indicating copy to clipboard operation
TcBlack copied to clipboard

Make TcBlackCLI work from every directory and with relative paths

Open Roald87 opened this issue 4 years ago • 4 comments

Currently TcBlack.exe only works under the following conditions:

  1. build.log needs to be present when executed in non-safe mode.
  2. TcBlack.exe is executed directly from its own folder
  3. All files which should be reformatted are entered with their full paths.

Roald87 avatar Jun 22 '20 07:06 Roald87

Hi!

Not sure if this is the right place to ask but I fiddled around a bit with the formatter and I couldn't seem to get the formatting to work on the implementation parts of the POUs. I tried to format the .plcproj as well as the .TcPOUs by themselves and I tried all command combinations as well as different directories.

Not quite sure if there's anything I'm missing here as I didn't get any error messages. I've attached a copy of the .TcPOU that I've tried on.

TcPOU.zip

Doctornunu avatar May 21 '21 14:05 Doctornunu

Hi @Doctornunu. Formatting of the implementation part of the POU is not implemented yet. It is planned for a future milestone. See also #40.

Roald87 avatar May 21 '21 16:05 Roald87

Oh, I was under the impression that this wasn't the case for "programs" / POUs. I interpreted this quote from the manual as it was only the case for function blocks, functions etc :

Note: Currently TcBlack only formats the declaration part of function blocks, functions, methods, properties and interfaces. Formatting of the implementation is planned for a future release.

Thanks for the answer though, I would love to contribute to the project once (or if) I get .NET + C# running properly in VSCode.

Doctornunu avatar May 22 '21 09:05 Doctornunu

Thanks for noting that! I've changed it now.

Roald87 avatar May 22 '21 16:05 Roald87