当前位置:网站首页>Idea sets the default line break for global newly created files

Idea sets the default line break for global newly created files

2022-07-06 01:14:00 Bug No.1 quality inspector

Read tonight 《 Ali Java Development Manual 》 In the code format section of , The tenth mandatory statute has attracted my attention . That's right ,

IDE Use of line breaks in files in UNIX Format , Do not use Windows Format .

So why is online search so , Get the following answer :

In development , You may encounter some command scripts using windows Under the text editor

When put into the test environment Linux In the middle of the day , The run will report an error .

This is because :

Windows: Binary line feed symbol :0d0a

Linux/Unix: Binary line feed symbol :0a


IDEA Set the default line break for global newly created files
Settings——>Editor——>Code Style below
IDEA Set the default line break for global newly created files
Be careful :

  • The changed default line break is only valid for new files , Existing files still need to be modified manually
  • The default line break setting is best installed at the beginning IntelliJ IDEA Software , In this way, all subsequent files are unified line breaks
原网站

版权声明
本文为[Bug No.1 quality inspector]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140135469156.html