Visual Lint 8.0.3.340 has been released

Products, the Universe and Everything from Products, the Universe and Everything

Visual Lint 8.0.3.340 has now been released. This a recommended maintenance update for Visual Lint 8.0, and includes the following changes:

  • Visual Studio 2022 now appears as a supported project type in VisualLintGui and VisualLintConsole.

  • Added a stub PC-lint Plus compiler indirect file for Visual Studio 2022 (co-rb-vs2022.lnt) to the installer. This will be replaced by an expanded implementation in due course.

  • Updated the values of _MSC_VER and _MSC_FULL_VER in the PC-lint Plus compiler indirect file co-rb-vs2019.lnt to support Visual Studio 2019 v16.10.4.

  • Fixed a bug in the Visual Lint Options Dialog which caused a "Visual Studio has encountered an unexpected error" message when the dialog was invoked while the Visual Studio plugin was loaded but turned off.

  • The Eclipse C/C++ project (.cproject) file reader now takes into account the value of buildPath attributes when parsing the <builder> elements which define the properties of makefile builds. If not specified, the value of buildPath is assumed to be ${ProjDirPath}.

  • Fixed a handful of typos in the helpfile.

    The Visual Lint plug-in included in this build is not compatible with Visual Studio 2022 Preview.

    Visual Lint beta builds with full support for Visual Studio 2022 Preview are however available. Please contact us if you would like to become a beta tester.

Download Visual Lint 8.0.3.340

ResOrg 2.0.9.29 has been released

Products, the Universe and Everything from Products, the Universe and Everything

ResOrg 2.0.9.29 has now been released. This a recommended maintenance update for ResOrg 2.0, and includes the following changes:

  • When installing/uninstalling the Visual Studio 2017/2019 extension (ResOrgPackage.vsix) the installer now invokes VSIXInstaller.exe silently rather than interactively, writing a logfile to %TEMP%.

  • Fixed a bug in the installer which could prevent the Visual Studio plug-in from being correctly installed to Visual Studio 2019.

  • Fixed a bug in the installer which could prevent the Visual Studio plug-in from being correctly uninstalled from Visual Studio 2017 or 2019.

  • Replaced the "invalid key entered" balloon tip in the Registration Key Dialog with an inline text field.

    The ResOrg plug-in included in this build is not compatible with Visual Studio 2022 Preview.

    Support for Visual Studio 2022 Preview is currently being worked on in the ResOrg development branch, and should become available in due course, but in the meantime ResOrgApp can edit VS2022 resource symbol files.

Download ResOrg 2.0.9.29

Visual Studio 2022 Preview 2

Products, the Universe and Everything from Products, the Universe and Everything

Visual Studio 2022 Preview 2 was released by Microsoft last week.

One of the changes included in Preview 2 is the addition of the Visual Studio 2022 specific v143 platform toolset (Preview 1 used the v142 platform toolset from Visual Studio 2019). Support for the v143 toolset has already been added to Visual Lint 8.0 and will soon become available within both VisualLintConsole and VisualLintGui in Visual Lint 8.0.3.

As part of that change, 8.0.3 will include a PC-lint Plus indirect file for Visual Studio 2022, and the Configuration Wizard and Options Dialog will both offer Visual Studio 2022 projects as an option:

Configuration Wizard with co-rb-vs2022.lntThe PC-lint Plus indirect file co-rb-vs2022.lnt has been added to to support Visual Studio 2022.

Furthermore, since Preview 1 was released last month we have been gradually plugging away (no pun intended!) in the Visual Lint development branch, adding support for the VS2022 VSSDK COM interfaces along with new x64 build configurations where needed.

It's worth noting that although named identically, the VS2022 interfaces differ somewhat from their 32 bit predecessors so a lot of boilerplate changes have been required. However as we (fortunately, it turns out) use an in-house Visual Studio interfacing library to wrap the Visual Studio COM interfaces we use those changes have been largely localised to the support library itself - and that's made things a lot easier than it might otherwise have been.

Once that was done we turned our attention to the Visual Studio plugin project itself, by adding x64 build configurations to it and then gradually working through the code fixing the inevitable compilation and linker errors (mostly by conditionally compiling out 32 bit specific code, such as that relying on the add-in interfaces used with Visual Studio versions prior to VS2015).

We finally got a clean build on a dev machine this morning, and then turned our attention to adding a VS2022 VSIX package project, which is necessary to deploy a plugin (or "extension", in Microsoft terminology) to VS2022.

A few tweaks, some headscratching and more tweaks later, and just after lunch today Visual Lint not only successfully loaded under debug in a Visual Studio 2022 experimental instance for the first time but also analysed its first project under that environment:

screenshotA development build of Visual Lint running within Visual Studio 2022 Preview 2. screenshotA development build of Visual Lint running within Visual Studio 2022 Preview 2.

Of course getting the plugin running under debug is just the first step - there is still much to do before we can release a public build with a VS2022 version of the Visual Studio plugin.

That said, getting to this point is hugely encouraging, so today has definitely been a good day.

Visual Studio 2022 Preview 1

Products, the Universe and Everything from Products, the Universe and Everything

Ever since news broke in April of Microsoft's plans for Visual Studio 2022 we have been waiting to get our hands on a preview build of the new version.

The first public preview was finally released on 17th June, so naturally we have spent the past few days taking a look to see what we need to do - both to analyse codebases using it and to update our existing Visual Lint and ResOrg plugins to integrate within it.


From what I can see, Visual Studio 2022 Preview 1 seems to use Visual Studio 2019 project files (the platform toolset is still v142, and _MSC_VER is still 1929). I've no doubt that will change in subsequent preview versions.

However, unlike its predecessor Visual Studio 2019, Visual Studio 2022 is a fully 64 bit development environment (although VS2019 and its predecessors can compile and debug 64 bit projects, the IDEs themselves are firmly 32 bit).

As such it follows that plugins for Visual Studio 2022 must also be compiled as 64 bit. Although the plug-in architecture is not changing in VS2022 (see The Future of Visual Studio Extensions), the move to 64 bit is a very significant change in itself.

For our Visual Studio plugin to run within VS2022, what we have to do is basically:

  • Recompile the existing plugins to target the x64 platform, using the new (VS2022 specific) 64 bit Visual Studio COM interfaces and the new (and also VS2022 specific) version of the Visual Studio SDK.

  • Add Visual Studio 2022 specific VSIX packages to deploy the x64 version of the plugins.

  • Update the installers to recognise VS2022 and install the new x64 version of the plugin.

  • Try not to break support for earlier Visual Studio versions in the process (those cannot load 64 bit plugins, so the existing 32 bit versions will still have to be maintained).

The full details of all of the changes involved are somewhat beyond the scope of this blogpost, but suffice it to say we have already started preparing to port the code to VS2022 and expect that to keep us busy over the summer.

(well, it's not as if anyone can really go on holiday right now, is it?)

The screenshots below show VS2022 Preview 1 with an AppWizard generated C++ VSIX extension project loaded and running. Note that I had to make a couple of minor corrections to the generated project and property files to get it to compile and link.

VS2022 IDE screenshotAn AppWizard generated VS2022 extension project loaded inside Visual Studio 2022 Preview 1 VS2022 plug-in project runningAn AppWizard generated VS2022 extension project running inside an experimental instance of Visual Studio 2022 Preview 1

Visual Lint 8.0.2.338 has been released

Products, the Universe and Everything from Products, the Universe and Everything

Visual Lint 8.0.2.338 has now been released. This a recommended maintenance update for Visual Lint 8.0, and includes the following changes:

  • Updated the values of _MSC_VER and _MSC_FULL_VER in the PC-lint Plus compiler indirect file `co-rb-vs2019.lnt to support Visual Studio 2019 v16.10.0.

  • Updated the values of _MSC_VER and _MSC_FULL_VER in the PC-lint Plus compiler indirect file co-rb-vs2017.lnt to support Visual Studio 2017 v15.9.36.

  • Project (e.g. $(ConfigName) or ${ConfigName}) and environment (e.g. %COMPUTERNAME%) variables can now be used in the values of the "Analysis configuration" [PC-lint/PC-lint Plus], "Warning policy" [PC-lint/PC-lint Plus] and "Generate reports in..." properties of a solution/project specific analysis configuration. [Visual Lint Professional and Enterprise Editions]

  • Project (e.g. $(ConfigName) or ${ConfigName}) and environment (e.g. %COMPUTERNAME%) variables can now be used in the values of the "Analysis tool installation folder", "Analysis tool executable", "When solution analysis completes..." and "Post-process PC-lint indirect (project.lnt) files after generation..." properties of a solution/project specific analysis configuration. [Visual Lint Enterprise Edition]

  • Fixed a bug in the implementation of the Solution/Project Analysis Configuration Dialog "Analysis tool executable" property. [Visual Lint Enterprise Edition]

  • Fixed a bug in the implementation of the Solution/Project Analysis Configuration Dialog "Warning policy" property. [PC-lint/PC-lint Plus] [Visual Lint Professional and Enterprise Editions]

  • Modified the Visual Studio plug-in to prevent duplicated entries for projects from appearing in the Analysis Status Display (this could be caused by the IDE sourcing duplicated "ProjectAdded" events, and these are now filtered out).

  • The Configuration Wizard "Analysis Tools" page no longer allows multiple analysis tools to be selected.

Download Visual Lint 8.0.2.338

Visual Lint 7.0.12.336 has been released

Products, the Universe and Everything from Products, the Universe and Everything

Visual Lint 7.0.12.336 is a recommended maintenance update for Visual Lint 7.0. The following changes are included:

  • Updated the interface with IncrediBuild to support IncrediBuild 9.5.x.

  • IncrediBuild analysis tasks can now be colour coded in the IncrediBuild Build Monitor from within the Visual Studio, Atmel Studio and Eclipse plug-ins.

  • Fixed a bug which could cause duplicate IncrediBuild analysis tasks to be queued.

  • Updated the prompt displayed if an IncrediBuild installation was not found when IncrediBuild analysis was enabled.

  • Various corrections and updates to help topics.

Download Visual Lint 7.0.12.336

Visual Lint 8.0.1.337 has been released

Products, the Universe and Everything from Products, the Universe and Everything

Visual Lint 8.0.1.337 is a recommended maintenance update for Visual Lint 8.0. The following changes are included:

  • If the Visual Studio plugin is selected for installation and the Visual Studio Debug Console (VsDebugConsole.exe) is running, the installer will now ask you to close it before installation can proceed.

  • Updated the interface with IncrediBuild to support IncrediBuild 9.5.x. [also in Visual Lint 7.0.12.336]

  • IncrediBuild analysis tasks can now be colour coded in the IncrediBuild Build Monitor from within the Visual Studio, Atmel Studio and Eclipse plug-ins. [also in Visual Lint 7.0.12.336]

  • Fixed a bug which could cause duplicate IncrediBuild analysis tasks to be queued. [also in Visual Lint 7.0.12.336]

  • Updated the prompt displayed if an IncrediBuild installation was not found when IncrediBuild analysis was enabled. [also in Visual Lint 7.0.12.336]

  • Updated the values of _MSC_VER and _MSC_FULL_VER in the PC-lint Plus compiler indirect file co-rb-vs2019.lnt to support Visual Studio 2019 v16.4.4.

  • Updated the values of _MSC_VER and _MSC_FULL_VER in the PC-lint Plus compiler indirect file co-rb-vs2017.lnt to support Visual Studio 2017 v15.9.35.

  • Various corrections and updates to help topics.

Download Visual Lint 8.0.1.337

Visual Lint 8.0 has been released

Products, the Universe and Everything from Products, the Universe and Everything

The first public build of Visual Lint 8.0 has just been uploaded to our website. As of today, Visual Lint 8.0 replaces Visual Lint 7.0 as the current supported Visual Lint version.

As such Visual Lint 8.0 licences (as well as upgrades for Visual Lint 6.x and 7.x* per user licences) will shortly become available in our online store.

* Licences for Visual Lint 1.x through 5.x can be upgraded manually - please contact us for details.

Customers with active Visual Lint 7.x priority support subscriptions should already have received updated licence keys for the new version.

Visual Lint floating and site licence subscription customers have the option of continuing with Visual Lint 7.0 until their next renewal or updating to Visual Lint 8.0.

In addition, all customers who have purchased per-user or per-server Visual Lint licences since 1st January 2021 are also eligible to receive new Visual Lint 8.0 compatible licence keys.

If any of the above applies and you need a licence key compatible with Visual Lint 8.0 please contact us, quoting your order number and licence key.

 

Among the many changes included in Visual Lint 8.0 is the addition of support for Clang-Tidy - an open source C++ analysis tool from the LLVM Project which is notable for its ability to automatically correct many of the issues it finds.

The Clang-Tidy Analysis Configuration Dialog allows you to configure the Clang-Tidy checks to be used.

The Clang-Tidy Analysis Configuration Dialog allows you to configure the Clang-Tidy checks to be used.

You can read more about the integration of Clang-Tidy into Visual Lint in the blogpost Clang-Tidying up the house.

 

The following changes are included in Visual Lint 8.0:

    Host Environments:

    • Projects whose physical location is defined using system environment variables within Visual Studio, AVR Studio 5.0 or Atmel Studio solutions (.sln, .avrsln or .atsln) files can now be loaded correctly.
       
    • Improved support for Eclipse project/build variables. In particular, variables of the form ${workspace_loc:/<ProjectName>/<resource_path>} and ${workspace_loc:/${ProjectName}/<resource_path>} should now be resolved correctly, even if the project is physically located outside of the workspace folder and <resource_path> is a linked resource.
       
    • Updated the values of _MSC_VER and _MSC_FULL_VER in the Visual Studio 2017 PC-lint Plus compiler indirect file co-rb-vs2017.lnt to support VS2017 v15.9.34.
       
    • Updated the values of _MSC_VER and _MSC_FULL_VER in the Visual Studio 2019 PC-lint Plus compiler indirect file co-rb-vs2019.lnt to support VS2019 v16.9.2.
       

    Analysis Tools:

    • Added support for the Clang-Tidy analysis tool. Clang-Tidy is an open source C++ analysis tool from the LLVM Project which is especially notable for its ability to automatically fix some of the analysis issues it detects.
       
    • Updated the PC-lint Plus message database to reflect changes in PC-lint Plus 1.4.
       

    Installation:

    • Added PC-lint Plus library indirect files lib-rb-stl.lnt and lib-rb-boost.lnt.
       
    • The PC-lint Plus library indirect file lib-rb-win32.lnt no longer includes tuning directives for the ATL, WTL and MFC libraries - instead, dedicated indirect files for these libraries (lib-rb-atl.lnt, lib-rb-wtl.lnt and lib-rb-mfc.lnt respectively) are now supplied.

      If you analyse ATL, WTL or MFC code your PC-lint Plus analysis configuration will need to be updated accordingly. The implementations of lib-rb-win32.lnt for PC-lint 8.0 and 9.0 are unaffected.

    Configuration:

    • Added a "Exclude files matching these wildcard masks" option to the Advanced Analysis Options Dialog. This can be used to (for example) automatically exclude generated files such as Qt moc_*.cpp files from analysis. Multiple masks can be specified by delimiting them with semicolons.
       
    • Revised the .vlconfig file format. The changes are backward compatible, so old format files can still be read and will be updated when saved.
       
    • Analysis Configuration files now include the name and major/minor version of the product which wrote them. Note that the full build version is not included, as that could cause unnecessary diffs in the resultant .vlconfig files.
       
    • Added the ability to override the preprocessor symbol and include folder properties of arbitrary project types using the Project Properties Dialog. This allows the analysis configuration of a project to be further customised (e.g. by injecting additional preprocessor symbols) without affecting the build environment. If the properties of the project are overridden in this way, a <projectfilename>.vlproj file will be written alongside the project file to store the overridden properties. [Visual Lint Professional, Enterprise and Build Server Editions]
       
    • Various changes to the implementation of options.
       

    Analysis:

    • The "Auto" value of the Maximum background analysis tasks option now allocates threads at 75% of the CPU logical core count.
       
    • Manual analysis can now optionally automatically fix some detected issues. To enable this option, select Clang-Tidy as the active analysis tool and check the "Apply suggested fixes" option in the Clang-Tidy Analysis Configuration Dialog. [Visual Lint Enterprise and Build Server Editions]
       

    User Interface:

    Commands:

    • The "Insert Directive" command on the Analysis Results Display context menu can now also be used to suppress Clang-Tidy analysis issues.
       
    • The "Lookup Meaning" command on the Analysis Results Display context menu is now available when analysing with CppCheck or Clang-Tidy.
       
    • Added an "Apply Fixes" command to the Analysis Status Display context menu. This command applies all fixes identified by Clang-Tidy to the selected implementation files.
       
    • Added a "Troubleshooting | View Fixes" command to the Analysis Status Display context menu. This command displays the contents of the Clang-Tidy .fixes file (if any) corresponding to the selected implementation file. These are YAML files associated with the clang-apply-replacements tool and which contain details of the issues Clang-Tidy has identified - and any changes it identified to fix them.
       

    Bug Fixes:

    • Fixed a bug in the expansion of project variables in multi-field strings where more than one field expands to the same variable. This manifested in Visual Studio 2019 where the include path "$(VC_IncludePath);$(WindowsSDK_IncludePath)" only expanded the first instance of $(WindowsSdkDir).
       
    • Fixed a bug which could affect the parsing of VisualDSP project files in the 64 bit version of VisualLintConsole.
       
    • Fixed a crash which which could occur while generating a Clang-Tidy command line for a standalone source file which is not part of any project.
       
    • Fixed a bug in the Analysis Results Display charts when rendering summaries of issues with embedded quotes in the issue title.
       
    • Fixed a bug in the Analysis Statistics Display which could cause some issues to be incorrectly displayed with the wrong issue category. The bug was identified while adding support for Clang-Tidy to the display.
       
    • Fixed a bug in the Analysis Status Display "Delete Analysis Results" context menu command which could cause an analysis task to be created for a file which was excluded from background analysis.
       
    • Fixed a bug which could prevent affected source files from being marked as stale when a header file was changed. The bug was identified while adding support for Clang-Tidy.
       
    • Fixed a bug which could cause uncommitted changes in the Property List Dialog to be lost if the "Expand project variables" checkbox was checked.
       
    • Fixed a bug in the x64 build of the Eclipse plugin.
       
    • Fixed a minor bug in the "Command Line" Options page.
       
    • Parsing operations on MSBuild project files can now be aborted part way through. This should make certain operations (e.g. changing configurations immediately after loading a solution) more responsive.
       
    • The Display Filter will no longer automatically attempt to suppress instances of issue 974 (note -- worst case stack usage...) if the active analysis tool is not either PC-lint or PC-lint Plus.
       
    • The Solution/Project Analysis Configuration Dialog now resizes correctly.
       
    • Corrected the tab order of the Solution/Project Analysis Configuration Dialog.
       

Download Visual Lint 8.0.0.335

Crash when docking windows in Visual Studio

Products, the Universe and Everything from Products, the Universe and Everything

We've all done it. You prepare a new build, install it, start testing before releasing it and then...it crashes. The immediate thought is always "What have we done...?".

Exactly that happened to us recently when testing a Visual Lint build - all we did was dock a window and then Visual Studio crashed and restarted.

Oops.

So, what had we done? As it turns out, nothing - the crash was actually caused by a Windows 10 update - and happened irrespective of whether any third party extensions are installed. KB4598301 is reportedly the cause, though others (e.g. KB4598299) also seem to cause the same effects.

The following community post has more details of the bug and possible workarounds:

https://developercommunity.visualstudio.com/content/problem/1323017/unexpected-vs-crash-when-docking-or-splitting-wind.html

We have no doubt that Microsoft will fix this very soon (in Visual Studio 2017 and 2019, at least) so for now we're not too worried, but in the meantime - or if you're using an older version of Visual Studio - the workarounds are to uninstall the update, or edit devenv.exe.config.

If you decide to do the latter, check to see if the if the configuration/runtime/AppContextSwitchOverrides element exists. If it does append the following to its value:

;Switch.System.Windows.Interop.MouseInput.OptOutOfMoveToChromedWindowFix=true;
Switch.System.Windows.Interop.MouseInput.DoNotOptOutOfMoveToChromedWindowFix=true

If however the element does not exist (it may not for older versions of Visual Studio), you can just add it:

<AppContextSwitchOverrides
value="Switch.System.Windows.Interop.MouseInput.OptOutOfMoveToChromedWindowFix=true;
Switch.System.Windows.Interop.MouseInput.DoNotOptOutOfMoveToChromedWindowFix=true" />

Once you restart Visual Studio you should then be good to go.

Visual Studio crashes when docking windows (TL;DR: it wasn’t us)

Products, the Universe and Everything from Products, the Universe and Everything

We've all done it. You prepare a new build, install it, start testing before releasing it and then...it crashes. The immediate thought is always "What have we done...?".

Exactly that happened to us recently when testing a Visual Lint build - all we did was dock a window and then Visual Studio crashed and restarted.

Oops.

So, what had we done? As it turns out, nothing - the crash was actually caused by a Windows 10 update - and happened irrespective of whether any third party extensions are installed. KB4598301 is reportedly the cause, though others (e.g. KB4598299) also seem to cause the same effects.

The following community post has more details of the bug and possible workarounds:

https://developercommunity.visualstudio.com/content/problem/1323017/unexpected-vs-crash-when-docking-or-splitting-wind.html

We have no doubt that Microsoft will fix this very soon (in Visual Studio 2017 and 2019, at least) so for now we're not too worried, but in the meantime - or if you're using an older version of Visual Studio - the workarounds are to uninstall the update, or edit devenv.exe.config.

If you decide to do the latter, check to see if the if the configuration/runtime/AppContextSwitchOverrides element exists. If it does append the following to its value:

;Switch.System.Windows.Interop.MouseInput.OptOutOfMoveToChromedWindowFix=true;
Switch.System.Windows.Interop.MouseInput.DoNotOptOutOfMoveToChromedWindowFix=true

If however the element does not exist (it may not for older versions of Visual Studio), you can just add it:

<AppContextSwitchOverrides
value="Switch.System.Windows.Interop.MouseInput.OptOutOfMoveToChromedWindowFix=true;
Switch.System.Windows.Interop.MouseInput.DoNotOptOutOfMoveToChromedWindowFix=true" />

Once you restart Visual Studio you should then be good to go.