tcunit / TcUnit

An unit testing framework for Beckhoff's TwinCAT 3
Other
271 stars 74 forks source link

Tcblack declaration format #118

Closed Roald87 closed 1 year ago

Roald87 commented 4 years ago

I just released a new version of TcBlack and ran it on your project. Thought you might like (some of) the changes it made to TcUnit.

You can also run it yourself of course. Download the release and use

> TcBlack.exe --indentation "    " --safe -p C:\Users\roald\Source\Repos\TcUnit\TcUnit-Verifier\TcUnit-Verifier_TwinCAT\TcUnit-Verifier_TwinCAT\TcUnitVerifier\TcUnitVerifier.plcproj
> TcBlack.exe --indentation "    " --safe -p C:\Users\roald\Source\Repos\TcUnit\TcUnit\TcUnitTcUnit.plcproj

Most of the changes are an added new line to make sure that ]]></Declaration> is always on a new line. For the declaration part this usually doesn't matter (since it usually ends with END_VAR), but for the implementation part it will. Unfortunately formatting of the implementation is not supported yet.

Other changes include:

Aliazzzz commented 4 years ago

Would you mind explaining in short what TcBlack exactly does?

sagatowski commented 4 years ago

@Aliazzzz : https://github.com/Roald87/TcBlack

sagatowski commented 3 years ago

@Roald87 Do you think you could add an GUI to TcBlack so it would work the same way as STWeep does? Would be nice to have an open-source alternative to StWeep.

Roald87 commented 3 years ago

Yeah I was looking into that some time ago. But it was not that straightforward. There was so much boilerplate that is it was quite confusing. I need some time to figure it all out.

sagatowski commented 3 years ago

@Roald87, what had lots of boilerplate? Not sure I understand.

Roald87 commented 3 years ago

Making a visual studio integration of TcBlack like STweep has with a custom menu and shortcut.

sagatowski commented 3 years ago

Do you have any sample code for this? How is the integration accomplished into the GUI of VS?

Roald87 commented 3 years ago

Do you have any sample code for this? How is the integration accomplished into the GUI of VS?

This is what I have so far. I haven't worked on it in quite some time, so not sure what the status is. But according a commit message formatting apparently worked. 👯

sagatowski commented 3 years ago

Do you have any sample code for this? How is the integration accomplished into the GUI of VS?

This is what I have so far. I haven't worked on it in quite some time, so not sure what the status is. But according a commit message formatting apparently worked. 👯

What is the plan for the implementation? When will it be finished? I have created a separate issue for this in the TcBlack repo: https://github.com/Roald87/TcBlack/issues/51

Roald87 commented 3 years ago

I saw your issue @sagatowski. I wasn't really motivated recently to work on it, because there was not much of a response. The lack of response was probably also partially due to the fact that it doesn't do that much currently. Let me think about the TcBlack project again and see if I can implement some features.

sagatowski commented 3 years ago

@Roald87 Yeah I understand. I've lost motivation a lot of times as well, but mostly due to the fact that TcUnit takes up too much time.

Would be a shame if you didn't get the motivation back for TcBlack because I think it's a really good project, but I think the integration to VS/TcXaeShell is necessary for it to get a broader usage. There aren't that many open-source projects for the TwinCAT community and would be a shame if another was lost. If you do a VS/TcXaeShell integration, I'll mega-promise I'll write an article about it on my blog for it to get more attention😃

Edit: I noticed the project has been "starred" ⭐ 22 times, so I don't think it's entirely unnoticed!

RogerChristopher commented 3 years ago

Jakob - I admire what you are doing with TcUnit and follow with interest. It's a big undertaking to find the time and energy required - I don't know how you do it! Roger

On Sat, 13 Mar 2021, 13:36 Jakob Sagatowski, @.***> wrote:

@Roald87 https://github.com/Roald87 Yeah I understand. I've lost motivation a lot of times as well, but mostly due to the fact that TcUnit takes up too much time.

Would be a shame if you didn't get the motivation back for TcBlack because I think it's a really good project, but I think the integration to VS/TcXaeShell is necessary for it to get a broader usage. There aren't that many open-source projects for the TwinCAT community and would be a shame if another was lost. If you do a VS/TcXaeShell integration, I'll mega-promise I'll write an article about it on my blog for it to get more attention😃

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tcunit/TcUnit/pull/118#issuecomment-798391065, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3VKDV3PXM6QBP2WKHB23LTDNS7RANCNFSM4QIEKZDQ .

Roald87 commented 3 years ago

I've lost motivation a lot of times as well, but mostly due to the fact that TcUnit takes up too much time.

I can imagine. Kudo's for getting past the beta stage!

but I think the integration to VS/TcXaeShell is necessary for it to get a broader usage.

Yeah I noticed that too. Currently trying to figure out how to integrate it in VS. So far not very successful. I think I'm going to consult @barteling to learn how he did it for STweep.

Edit: I noticed the project has been "starred" ⭐ 22 times, so I don't think it's entirely unnoticed!

That is true!

Roald87 commented 3 years ago

I'll mega-promise I'll write an article about it on my blog for it to get more attention😃

That sounds very tempting :D

Roald87 commented 3 years ago

I just released a very rudimentary plugin.

sagatowski commented 1 year ago

I'll close this guy. Once I've managed to merge all the (functional) pull requests we might discuss how we can utilize TcBlack as part of the toolchain.

Roald87 commented 1 year ago

No problem. I don't have plans to further develop TcBlack. It is a lot of effort and I personally do not program a lot in TwinCAT anymore.

sagatowski commented 1 year ago

@Roald87 Fully understand that and can only relate. It's a part-time job to maintain and support TcUnit for all the users...

Maybe opening a "Sponsor"-page for TcBlack would be something?

Roald87 commented 1 year ago

There is already a sponsor page :sweat_smile: .

Even if people would pay me, I doubt it would motivate me enough to do it.

I didn't know you still worked on TcUnit. I see you recently pushed some new commits.

sagatowski commented 1 year ago

Haha, got it 😅 Most of the work is support through all the e-mails/messages I get from companies that want (free) help 😅