Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » [PROPOSAL] CppCheck support
Re: [PROPOSAL] CppCheck support [message #61739 is a reply to message #61660] Sat, 19 July 2025 13:43 Go to previous message
deep is currently offline  deep
Messages: 273
Registered: July 2011
Location: Bangalore
Experienced Member
Hi

I updated my local git to merge CPP check with nightly build with following changes

Linter.cpp file patch
diff -U 3 /WC_Linter/uppsrc/ide/Linter/Linter.cpp /upp_lint/uppsrc/ide/Linter/Linter.cpp
--- /WC_Linter/uppsrc/ide/Linter/Linter.cpp	Fri Jul 18 19:18:37 2025
+++ /upp_lint/uppsrc/ide/Linter/Linter.cpp	Sat Jul 19 16:45:54 2025
@@ -74,7 +74,7 @@
 
 String Linter::GetPackagePath() const
 {
-	return TheIde()->GetActivePackagePath();
+	return TheIde()->GetActivePackageDir();
 }
 
 void Linter::CheckFile()
@@ -89,7 +89,8 @@
 {
 	if(!Exists())
 		return;
-	Vector<String> paths = { GetFileFolder(GetPackagePath()) };
+	Vector<String> paths = { GetPackagePath() };
 	DoCheck(Scope::Package, paths);
 }
 
@@ -100,7 +101,8 @@
 	Vector<String> paths;
 	const Workspace& wspc = GetIdeWorkspace();
 	for(int i = 0; i < wspc.GetCount(); i++)
-		paths.Add() = GetFileFolder(PackagePath(wspc[i]));
+		paths.Add() = PackageDirectory(wspc[i]);
 	DoCheck(Scope::Project, paths);
 }
 



And applied changes manually to following files.
Lines to be inserted marked ++

/ide/idebar.cpp file
		#ifdef PLATFORM_POSIX
			if(IsValgrind())
				menu.Add(b, AK_VALGRIND, THISBACK(Valgrind))
					.Help("Build application & run in valgring");
		#endif

			menu.Separator();
++		#ifdef flagLINTER // Experimental static analyzer tools support.
++			Linter::StdMenu(menu);
++		#endif
		}
	}


/ide/ide.upp file
	Report,
	Core/SSL,
	plugin/md,
	ide/clang,
++	ide/Linter;


/ide/ide.h file
#include <TextDiffCtrl/TextDiffCtrl.h>
#include <ide/Designers/Designers.h>
#include <ide/Android/Android.h>
#include <plugin/md/Markdown.h>

++	#ifdef flagLINTER
++	#include <ide/Linter/Linter.h>
++	#endif

#include "About.h"
#include "MethodsCtrls.h"

#define LAYOUTFILE <ide/ide.lay>
#include <CtrlCore/lay.h>


Use flags for compilation GUI LINTER


Warm Regards

Deepak
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Issue with UPP Win 17895
Goto Forum:
  


Current Time: Sat Aug 02 21:38:54 CEST 2025

Total time taken to generate the page: 0.08204 seconds