Code analysis VB6 Project with CodeSmart via command line - vb6

im using CodeSmart 3.4.6.297 to get code metrics from my vb6 projects.
now i want to include codesmart in my build-process using TeamCity.
i know that codesmart can be user in the command line. this works for me. i have my command line.xml file:
<sourcemonitor_commands>
<write_log>true</write_log>
<command>
<project_file>Path to xyz.smproj</project_file>
<project_language>VB</project_language>
<modified_complexity>true</modified_complexity>
<file_extensions>*.cs,*.Designer.cs,*.frm</file_extensions>
<source_directory>Path to Project</source_directory>
<include_subdirectories>true</include_subdirectories>
<checkpoint_name>Baseline</checkpoint_name>
</command>
</sourcemonitor_commands>
which generates a projectXYZ.smproj file.
My question now is...
how do i export data (code metrics like lines of code) from this smproj file using a console command?
i can get code metrics when i open my projectXYZ.smproj file in the codesmart IDE and exporting data using the menue "file...export Checkpoint details" but i need this in a console command
Any ideas?
Greetings
SLimke

Got it myself. had to add an export area to the command block
<export>
<export_file>PathToProject\Checkpoint1.xml</export_file>
<export_type>2 (checkpoint details as XML)</export_type>
<export_option>1 (do not use any of the options set in the Options dialog)</export_option>
</export>

Related

I can't export a custom report name from html-reporter-extra

This really should be straightforward but I can't get it to work.
It's a simple setup: I have a locally run Jenkins, exported Postman collections that I'm running using newman. I got html-report-extra installed and it's generating a report but I can't get it to export the html file under a different name!
I have a locally installed Jenkins, I'm using a freestyle project and under Build - Execute Windows batch command I have this:
newman run IDMS4.postman_collection.json -e IDMS4.postman_environment.json --reporters cli,htmlextra --reporter-html-export newman/index.html --disable-unicode
This is how my Jenkins job is setup:
Jenkins job setup
Build completes but there is no index.html anywhere. This is the the part that's puzzling me.
In
.jenkins\jobs\Newman runner\htmlreports\HTMLReport
i get the default file format name (project name + timestamp).
In
.jenkins\workspace\Newman runner\newman
I also get project name + timestamp html files.
Why is this outputed to both folders and how can I get this to export just one index.html?
Please try with dot slash. eg: ./newman/index.html.
and also
if you need collection name to be in the report, please use following node module
https://www.npmjs.com/package/jaiman

Passing params in Spoon (Pentaho) Transformation by command line

I'm using Pentaho Data Integration (Spoon) 8.1. I'm trying to passing parameters to a transformation using the command line. I'm using the sample writeback.ktr. This is my line:
java -jar launcher\launcher.jar -lib ..\libswt\win64 -main org.pentaho.di.pan.Pan -initialDir "C:\Users\Sistemas\Documents\Pentaho-Data-Integration"\ -file:"C:\Users\Sistemas\Documents\Pentaho-Data-Integration\samples\trans\writeback.ktr" -param="arg1=Boris" -param="arg2=Pedro" -param="arg3=Cristian" -level:Minimal
But it keeps creating the file without the values I'm passing to. I'm also try these other ways:
-param:"arg1=Boris"
-param:arg1=Boris
I'm using this configuration. Nothing seems to work. Can anyone help me please
Thanks
Below is the sample:
pan.bat /file:C:\Pentaho_samples\repository\repository_export.kjb
"/param:rep_name=PDI2000" "/param:rep_user=admin" "/param:rep_password=password"
"/param:rep_folder=/public/dev"
"/param:target_filename=C:\Pentaho_samples\repository\export\dev.xml"
Check below link for more clarification.
https://help.pentaho.com/Documentation/8.0/Products/Data_Integration/Command_Line_Tools
Well... after trying different alternatives, finally got a solution:
pan.bat -file:C:\trans\writeback.ktr "PDI2000" "admin"
This way, my transformation took the parameters.
Thanks.

vim filetype plugin conflict with session

Problem
When I restore from a session, It'll be impossible for to load my filetype plugin.
For example, I have an arduino filetype plugin of ~/.vim/ftplugin/arduino.vim, and the content is like this.
SyntasticToggleMode
call feedkeys("\<CR>")
nnoremap <leader>s :w<cr>:ArduinoVerify<cr>
nnoremap M :ArduinoUpload<cr>
I create an arduino file named test.ino to do some coding.
Every thing seems pretty smooth.
The filetype plugin is loaded properly.
Then I close vim with the following commands.
:mksession!
:wviminfo viminfo
:qa
Now there is a session file named Session.vim.
Then I open vim again, and it automatically load the session because I have something like this in my .vimrc.
filetype indent plugin on
if filereadable("Session.vim")
source Session.vim
endif
if filereadable("viminfo")
rviminfo viminfo
endif
Now something went wrong, the key mapping in my arduino filetype plugin is not working.
Also it prints some error message like this.
Error detected while processing /home/lotp/.vim/ftplugin/arduino.vim:
line 1:
E492: Not an editor command: SyntasticToggleMode"sketch_dec06a.ino" "sketch_dec06a.ino" 12L, 150C
E492: Not an editor command: SyntasticToggleMode
IndeedSyntasticToggleMode is a valid vim command belonging to a vim plugin named syntastic.
Question
Is there a solution to solve this problem?
By this I mean using the session and filetype plugin feather simultaneously.
A partial answer:
The plugins are not loaded directly in .vimrc if you use a plugin manager. Their paths are just appended to 'runtimepath', and they are sourced later in the initialisation process.
You can try to add (i.e. in .vimrc) your own custom path to runtimepath, AFTER the end of the plugin initialisation. (i.e., for Vundle, after this line: call vundle#end()) Then add a vim file in your_custom_path/plugin where you put your code to source the session file.
I didn't check all the infos I gave, so sorry for mistakes, but hope it gives you some ideas.
See :h startup, :h 'runtimepath'
Finally I work around this problem by using an vim plugin.
That's somekind of improved version of the built in vim session system
It's called vim-session

Running a command line for groovy from XCode after unit testing

I edited my target scheme to run a script action after testing as below
Target Scheme -> Test (Debug) -> Post Actions
The script hw.sh had a simple command line call:
open /Applications/Safari.app/
It worked fine for the above script. When I changed it to the following
groovy http://frankencover.it/with -s /Users/sasokan/Downloads/MyProject
Nothing happened. How can I call this groovy application using a script.
I am also trying to run frankencover.it and had the same problem you did. I eventually found this answer on SO that lead me to a solution. I added the following before calling frankencover.it and it fixed the issue.
PATH=${PATH}:/usr/local/bin
I will further note that even if you use the full path to groovy in the command frankencover.it will fail internally because it cannot find 'lcov' for the same reason.

Make Geany recognize additional file extensions

My default Geany installation on Debian does not recognize some file types out of the box. How can I add extensions, using the same syntax highlighting as other known extensions for simplicity's sake?
In the current case, I'd like Geany to open all .aspx files with the same highlighting as .html files.
Use inside the menu Tools->Configuration files->filetype_extensions.conf. This will allow you to configure the filetypes based on suffix for your user.
Just add new extensions in /usr/local/share/geany/filetype_extensions.conf
I had trouble accomplishing this without help from here.
Go here to read documentation about this topic.
From the Geany menu, go to:
Tools > Configuration Files > filetype_extensions.conf
Go to this line and un-comment it:
#~ [Extensions]
So that it just reads:
[Extensions]
I was needing to add .mjs as an additional extension for javascript. So, for me, I also uncommented this line:
#~ Javascript=*.js;
And changed it to:
Javascript=*.js;*.mjs;
After this, I saved the file.
Now when I opened files having a .mjs file extension, they automatically have Javascript Syntax Highlighting.
I made some suggestions to improve this expeirience here.

Resources