Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cucumber - Java - Non-ASCII characters in an identifier

Hi community: I'm working with Cucumber in another language different than English.

When I generate the Step Definitions it displays a message over the void method

Non-ASCII characters in an identifier 

This is the Step Definition sample.

@Y("^se despliega un menú lateral con diferentes opciones$")
   public void seDespliegaUnMenúLateralConDiferentesOpciones() {}

What should I do in this situation?

like image 383
nosequeweaponer Avatar asked Sep 05 '25 16:09

nosequeweaponer


2 Answers

This is an inspection generated by IDEA (presumably). It intends to guard against possible complications related to character encoding. However as you are using Cucumber in a language other then English you will be dealing with these anyway. This makes the warning superfluous.

You can turn the warning off by selecting the method name, pressing Alt-Enter and from the menu search for the "Edit Inspection Profile Option".

like image 120
M.P. Korstanje Avatar answered Sep 07 '25 18:09

M.P. Korstanje


This is indeed an Intellij IDEA "code inspection" setting.

I found the setting here:

File (Menu) 
  > Settings
     > In left pane of the popup window, open "Editor"
        > Choose "Inspections" 
           > Type "ASCII" into the "search" text field
              > Select "Non-ASCII characters" under "Internationalization"

The popup window then looks as below, and you can unmark the option on the bottom right.

Inspection options as shown by IDEA

like image 34
David Tonhofer Avatar answered Sep 07 '25 18:09

David Tonhofer