Okay, I have the following project structure
- MegaDirectory
--- SubProject1
----- coverity.conf
--- SubProject2
These subprojects are handled as git submodules.
I use codesight plugin with visual studio code.
I have created the following coverity.conf file in the first subproject.
{
"$schema": "http://URL.com/schemas/coverity.conf.schema.json",
"type": "Coverity configuration",
"format_version": 1,
"format_minor_version": 7,
"settings": {
"cov_run_desktop": {
"build_cmd": ["make","-C", "$(code_base_dir)/build"],
"clean_cmd": ["make","-C", "$(code_base_dir)/build","clean"]
},
"ide": {
"build_strategy": "CUSTOM"
}
}
}
If I open the subproject folder as the root folder inside vs-code and edit a file from it, I get the codesight output and everything works ok.
If I open the MegaDirectory as the root folder inside vs-code and edit a file from the subproject, I get an error that this file is uncaptured.
I have been delving into the configuration of codesight, but I got nothing useful.
Is there a solution to this ?
Thanks
Related
so I'm a developer working mostly with c using yocto/openembedded for developing our products. I'm trying to set up my nvim with coc-cland as an IDE, but having some problems.
So what I want is to give languageserver the compile_commands.json file. I have the setup working when the compile_commands.json is in the "root of the src dir" but the compile_commands.json is normally not generated in the source folder instead it is generated to <root of src dir>/oe-workdir/<project name>/compile_commands.json. How do I tell coc to use that file if it exists? Finding the file is easy using shell script, but what variable shall I set and where?
My :CocConfig looks like:
{
"languageserver": {
"coc-clangd": {
"command": "clangd",
"rootPatterns": [ ".git/", "compile_flags.txt", "compile_commands.json"],
"filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"]
}
}
}
I have found some relevant git for coc-clangd (https://github.com/clangd/coc-clangd) where it states that I can set the clangd.arguments but I need to do it dynamically as the <project name> folder changes name from project to project, can I do it in the :CocConfig or can I do it in my vimrc/init.vim?
I use CTRL+Click (or F12) to search and open the definitions in vscode. The problem is that my files are copied to another directory called sketch as I compile my code, so when I wanna open the definition of a function, VS shows both files (the real and the copied ones in the sketch folder), and sometimes I edit the copied file by mistake!
How can I exclude some folders from the "Go To definition"?
I had the same problem in a Javascript project.
None of the following solved it for me: files.exclude, files.watcherExclude, or search.exclude.
The solution was to add jsconfig.json to my project folder:
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"Backup",
"Sketch"
]
}
This example specifies two folders to exclude: "Backup", and "Sketch".
If you are using TypeScript, use a tsconfig.json file instead.
Also see https://code.visualstudio.com/docs/languages/jsconfig
Add files to C:\Users\user\AppData\Roaming\Code\User\settings.json:
"files.exclude": {
"**/sketch": true
},
Or files to exclude when searching (in files):
"files.watcherExclude": {
"**/*.x": true,
},
Class not found exception in Visual studio code because vs-code debug takes output class files form bin directory like eclipse but i am using GRADLE for build so MapperImpl.java which is implementation files in mapper are created in the build folder i don't know how to solve the issue i tried to change the classpath all the solutions i tried but nothing working please i need your help
I am also posting the vs code file launch.json
{
"type": "java",
"name": "Debug (Launch)-Application<RestApi>",
"request": "launch",
"mainClass": "ae.org.nge.Application",
"projectName": "RestApi",
"vmArgs": "-DngeConfig=C:/Users/Manoj.Dhayalan/source/myapp/Application/config/myapp-config.properties -Dserver.port=8081 -Dspring.profiles.active=dev"
}
I don't use Visual Studio Code but I managed to change the location of generated class file by putting this lines into my build.gradle file:
compileJava {
options.setAnnotationProcessorGeneratedSourcesDirectory(file("$projectDir/src/main/generated"))
}
This way gradle will generate MyMapperImpl in src instead of build folder and it should be also recognized by VS Code.
I have a project with this structure:
-src
-dist
-node_modules
-gulpfile.js
-tslint.json
My typescript files reside in src and are transpiled in a gulp task into dist folder. I've installed tslint locally and started with a plain tslint config:
{
"rules": {
"max-line-length": {
"options": [120]
}
}
}
Now, when I run tslint from a command line, I get warnings about all files in 'src' folder as expected. But VSCode highlights only the errors in currently opened file. The 'Problems' tab is getting filled only when I open a file with a tslint error.
Do I need to add some configuration to VSCode launch.json?
At the moment it seems like it's not possible to show all warnings for all files in a project. You might be able to achieve something similar with a VS Code task that starts a watcher.
There's a feature request for this though.
I have some .txt files in a subfolder of my project which contain SQL code. I want SQL syntax highlighting so I added this to my workspace folder settings:
{
"files.associations": {
"**/somefolder/*.txt": "sql"
}
}
This works when there are the two stars in front of the folder name. But somefolder actually is a folder direct under my project's root.
Why can I not write the glob like somefolder/**/*.txt?
Seems like this new version of VSCode requires you to use the ** at the start regardless:
{
"files.associations": {
"**/somefolder/**/*.txt": "sql"
}
}
That should work
For a jekyll site the following workspace setting works for me
{
"files.associations": {
"*.html": "jekyll",
"**/_site/**/*.html": "html",
}
}