code formatter for grails and Groovy? [closed] - grails

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm currently using a basic text editor to write my grails code. Does anyone know of a program that will automatically format code with indentation similar to indent does for C? I'd rather use a commandline program to do this but can use an IDE to format my code if that's the only option.

Try NetBeans v.6.7 (not the current production release 6.5) with the NetBeans Groovy/Grails plugin enabled. This is a nice clean IDE interface (easier to use than Eclipse IMHO), and you can set it up to integrate with your Grails installation. You can call all your Grails tasks from the IDE, edit your code, test and run your project. Then, if you want to format your code, you just right-click in the code editor and select "Format". Easy!

I am using VIM / GVIM for typing code in Groovy/Grails. it has code formatting, I just need to tell my VIM that groovy and java are similar....
and then press gg = G [enter] (format from top to bottom)

There is a tool recommended in this thread for this purpose. I have not tried it but maybe worth a look.

Here's some instructions on how to get Grails working with NetBeans (couldn't submit the second URL in my last post).

the groovy eclipse plugin does a decent job of formatting groovy code. sts might be smarter about some of the grails code.

You can use npm-groovy-lint for command line, and VsCode Groovy Lint in Visual Studio Code IDE :)
https://www.npmjs.com/package/npm-groovy-lint
https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-groovy-lint

Related

Html reporting solutions for Specflow using NUnit [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am setting up a c# BDD Test automation framework using the following basic components:
Specflow
NUnit / SpecRun (test runner - see below)
Selenium
I have successfully set up a framework which executes tests and generates a nice HTML report (to do this, I used SpecRun as the test runner.. http://www.specflow.org/plus/runner/).
I am now trying to set my tests up to execute in Sauce labs to do cross-browser and device testing. Jenkins has a nice Sauce plugin which allows you to specify the platforms and the tests are then run across each selected platform.
I have also identified Saucery (http://fullcirclesolutions.com.au/) as a potential time saver in setting this integration up, however, this would mean that I would need to use NUnit as my test runner instead of Specrun.
If I am to go down the NUnit route, does anyone know of any decent html reporting solutions which I can integrate into the test run. A lot of googling has returned very little in the way of answers here.
Thanks!
You can use the specflow.exe program to create reports, it comes with the specflow package. How it works in detail can be found on the specflow github. Summarized:
In order to generate this report you have to execute the acceptance
tests with the nunit-console runner. This tool generates an XML
summary about the test executions. To have the detailed scenario
execution traces visible, you also need to capture the test output
using the /out and the /labels options as it can be seen in the
following example.
nunit-console.exe /labels /out=TestResult.txt
/xml=TestResult.xml bin\Debug\BookShop.AcceptanceTests.dll
The two generated files can be
used to invoke the SpecFlow report generation. If you use the output
file names shown above it is enough to specify the project file path
containing the feature files.
specflow.exe nunitexecutionreport BookShop.AcceptanceTests.csproj
/out:MyResult.html
Allure.
https://github.com/allure-framework/allure2
NUnit, Specflow, any framework

Sonarqube Delphi plugin [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have scoured the web looking for the Sonar Delphi plugin 0.2 (sonar-delphi-plugin-0.2-SNAPSHOT.jar). Since the shutdown of codehaus, it seems this plugin is not available anywhere else?
http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/sonar-delphi-plugin/0.2-SNAPSHOT/
There is several references to this URL, but I cannot find this plugin anywhere else.
Does someone please know where I can download it, or possibly has it available to share?
The plugin was abandoned and picked up by Fabricio Colombo and relocated to github
https://github.com/fabriciocolombo/sonar-delphi
Look at 'Releases' to get the latest plugin .jar
If you really want the 0.2 snapshot... it appears that you can use the "Wayback Machine" internet archive to grab it at:
https://web.archive.org/web/20140324100408/http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/sonar-delphi-plugin/0.2-SNAPSHOT/
I have just published an updated version our SonarQube Delphi plugin which supports Sonar 7.9 LTS and also the latest 8.2 version, see https://github.com/mendrix/SonarDelphi.
If you combine this with the DelphiCodeCoverage tool (see https://sourceforge.net/projects/delphicodecoverage/) and DUnitX (including the additional file in our SonarQube repository) you have a fully functioning SonarQube plugin for Delphi.
GitHub has these three projects of Sonar from Codehaus:
https://github.com/codehaus?utf8=%E2%9C%93&query=sonar
The project sonar-plugins is empty but references on https://github.com/sonarcommunity.
There are plenty of plugins. See if you can find it there.

Installshield: Setting the Installdir to an environment variable [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
EDIT:
NO LONGER RELEVANT. Due to difficulties with Installshield including not only this issue but also issues with getting it to build with the project in Visual Studio and its inability to replace one of the old files that needs to be replaced I am now coding an installer in C#. I should have done this earlier because I'd be done by now. Thank you Christopher Painter and Michael Urman for trying to guide me though this issue. Unfortunately I did not get anywhere further with it.
ORIGINAL POST BELOW
Honestly, this has been like pulling teeth. I hope that I'm missing something blatantly obvious. I have been trying to get Installshield to let me set the INSTALLDIR to an environmental variable. This is necessary because of the way the company does things. I know I can set it outside of the installer via a batch file which calls the MSI and passes the folder via an argument, but that solution ended up with an unfriendly MSI. If anyone has any internal solutions please let me know.
Windows Installer has the Environment table that is exposed by InstallShield in the environment view and component | advanced settings | environment view.
Setting Environment Variables
Windows Installer allows you to refer to environment variables using a variant of property notation. I would suggest an approach similar to RobertDickau's, where you use a set-property custom action early to set INSTALLDIR from [%SOMEVAR]. Only run the custom action if INSTALLDIR isn't already defined, so that people can override INSTALLDIR at the command line. Note that this must be run before costing, or you will have to find a different condition and use a set-directory action (like Robert mentions) instead.

Jelly Framework used in Jenkins [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Please let me know how Jelly is used in Jenkins.
Any docs explaining the architecture of GUI in Jenkins will be helpful.
Any tutorial explaining the high level code details or any pointers in the region
The starting point to Jenkins development is the Extend Jenkins page.
On this page, there is a number of sub pages that discuss different aspects of Jelly, see under "Writing Views (Jelly/Groovy)" in the menu.
This along with the tutorials at the bottom of the Plugin tutorial page is a good start.
Some basics:
All Jelly files are connected to a corresponding class based on the path of the Jelly file:
src/main/java/com/example/MyClass.java
src/main/resources/com/example/MyClass/config.jelly
There are a number of different names for different purposes on the jelly files, e.g.: portlet.jelly, index.jelly, global.jelly, config.jelly.
If you are writing a job/build plugin, global.jelly corresponds to system configuration while for job configuration you will use config.jelly.
Happy coding!
You will need maven and can install it from the command line
$ mvn -U org.jenkins-ci.tools:maven-hpi-plugin:create
This will ask you a few questions, like the groupId (the Maven jargon for the package name) and the artifactId (the Maven jargon for your project name), then create a skeleton plugin from which you can start with. Make sure you can build this:
$ cd newly-created-directory
$ mvn package
This is documented here https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
This ships with lots of UI examples to look at. I would advise using either IntelliJ or eclipse as they have tools to integrate into the maven build process

Editor for groovy and grails? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Is there any editor like notepad++ for groovy or
any editor that support .groovy highlighting.
Please help with link and name.
You mentioned NotePad++ in your question. If you want Groovy syntax highlighting in NotePad++, download the user defined language file from
http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files
http://docs.notepad-plus-plus.org/index.php?title=User_Defined_Language_Files
and add it to the installation directory.
IntelliJ has great Groovy and Grails support; the free community edition doesn't support Grails.
Sublime Text 2 is my current favorite cross-platform editor. AFAIK it doesn't have a GSP-specific mode, but (a) does have JSP, and (b) is customizable. It uses TextMate bundles, Groovy and Grails available:
Groovy bundle
Grails bundle
Sublime-specific Grails
An amazing IDE is STS — powered by Springsource, based on Eclipse and stand-alone. Free, ready to deploy (with a dedicated plugin).
I use GGTS devoted to Groovy and Grails : free IDE based on Eclipse delivered by SpringSource.
see http://groovy.codehaus.org/IDE+Support and http://groovy.codehaus.org/Other+Plugins
Update: The useful page is currently:
http://groovy-lang.org/ides.html
Guess what sublime has great support for groovy. This is not IDE, its just a text editor
Vim/gVim has Groovy highlighting if you're looking to kick it oldschool.

Resources