LaVOZs

The World’s Largest Online Community for Developers

'; groovy - Intellij IDEA. Check syntax for files without extension - LavOzs.Com

I have Jenkinsfile it's written in Groovy, but file name doesn't have approprite extension: .groovy. How can I tell IDEA to check groovy syntax of this file?

Update: Also I interested in the same question about GoLand IDE

From the project sidebar, right-click the file and choose "Associate with File Type". Then just select Groovy from the menu, and you're all set.

enter image description here

GoLand does not support Groovy so this will not be possible there.

If you add following header comment in the beginning of your Jenkinsfile:

#!groovy

IntelliJ IDEA will automatically recognize this file as a Groovy source file. It should work for other editors and IDEs as well.

Related
Disable spell checking on IntelliJ IDEA
Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project
How can I check the syntax of Python script without executing it?
Import Maven dependencies in IntelliJ IDEA
Can IntelliJ IDEA encapsulate all of the functionality of WebStorm and PHPStorm through plugins?
git with IntelliJ IDEA: Could not read from remote repository
Jenkinsfile syntax highlighting in Java project using Intellij Idea
How can I prevent IntelliJ IDEA from reassigning file type associations at startup?