Switch to .Net Global Tool for JetBrains tools
As per docs here:
https://www.jetbrains.com/help/resharper/ReSharper_Command_Line_Tools.html#install-and-use-resharper-command-line-tools-as-net-core-tools
This may require upstream changes in Cake to support. If I remember correctly, DupFinder and InspectCode is provided from Cake itself and not an addin. Alternatively, an addin may perhaps be created to consolidate the calling since it will need to call the same executable every time (not completely sure about this one).
Just to follow up with the above...
In the .Net Global Tool version of the JetBrains tools, there is a new command jb which will then invoke either jb dupfinder or jb inspectcode. So it isn't a straight call to dupfinder or inspectcode, those actually need to be provided as an argument to the jb command.
Off the top of my head, I am not sure how best to handle this...
Re-opening this issue for now, since there are problem running the global tool on Linux, and also the suggestions is to create a new Cake.JetBrains addin, rather than trying to force the existing DupFinder and InspectCode aliases to use the new global tool.
For reference: here is the issue regarding DupFinder
Warning: While cataloging the assembly “JetBrains.Platform.MsBuildAutoDetectTask, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.Platform.MsBuildAutoDetectTask, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.Platform.MsBuildTask, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.Platform.MsBuildTask, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.ReSharper.Features.Internal, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.CommandLine.Products, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
Warning: While cataloging the assembly “JetBrains.CommandLine.InspectCode.MsBuild, Version=777.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325”, could not load the assembly reference named “Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”.
JetBrains Duplicates Finder 2020.2.2
Running in 64-bit mode, .NET runtime 3.1.8 under Unix 5.4.0.1025
Using toolset version 16.0 from /usr/share/dotnet/sdk/3.1.402
Collecting files to analyze:
from project '/home/runner/work/Cake.Transifex/Cake.Transifex/Cake.Transifex.sln'.
23 files found to analyze.
Duplicates report was written to /tmp/tmpGcXl2k.tmp
An error occurred when executing task 'DupFinder'.
https://github.com/cake-contrib/Cake.Transifex/runs/1159059895?check_suite_focus=true#step:6:1113
There are a few possible problems that cause the above error
- There is a mistake from the developers, and they have marked the dependencies as private
- The executable must be executed with
dotnet jbinstead ofdotnet-jb. This means it needs to be installed as a proper tool, and not to the tools directory (which causes cake to not find it :( ) - There is a hard requirement on the .NET Core runtime being used (unlikely)