Why messages about CR/LF for files?

(mtiede) #1

I keep getting messages about files having inconsistent line endings. In particular, Service generated files, when refreshed in the IDE, complain.

Is something being done wrong? Should I turn this off someplace? If I tell it to ignore these warnings, will something else be incorrect?

(RemObjects) #2

Thanks, logged as bugs://72330

(marc hoffman) #3

generated by what? RO/.NET?

(mtiede) #4

.Net sort of. Silverlight. Using the slSvcUtil with the Oxygene as language.

(mtiede) #5

Looks like it also happened when I added a resource to the project. Opening the generated resource file, produces the warning.

(Bob Russell) #6

Same for me - VS2015 Oxygene WPF projects. What’s the latest on this?

(marc hoffman) #7

what exact files do you get the message on? whatever created the file is giving it inconsistent line endings. you can ignore it, but it should not happen…

(Bob Russell) #8

I was manually adding methods to a WPF window pas file (using VS2015) (e.g. the Loaded method) because of the issue relating to double clicking on the method in the window’s methods to add it. I add the method to the pas file, then edit the xmal file (e.g. Loaded=“MyLoadedMethod”). It also seems to happen at random when doing normal editing work on any of the project’s pas files. Closing VS2015, then reopening seems to cure it, but difficult to tell since it doesn’t happen all the time. As you say, it’s not a major problem, so I’ll keep an eye on it and let you know if I can see a pattern.

(marc hoffman) #9

next time it happens, can you tell VS to not fix it, and send me the source file, so i can check what parts have the wrong linebreaks? thanx!

(Bob Russell) #10

Will do. Thanks.

(Bob Russell) #11

Hi Marc, attached a file showing the CRLF problem. Note some of the lines in the method: clsCommon.MinimisePath. They have just a LF character. As I recall, some of these lines were edited by me in VS2015, and some were copy/pasted from a website.

Hope this helps.

Regards Bob Russell

cdeCommon.pas (3.14 KB)

(marc hoffman) #12

Ok, pasting from a website could ofc do it — that’d be a VS editor problem, we don’t control that afail. I’d be interested to find a scenario where our code turns a file that’s previously fine into a mixed file (eg., after adding a WinForms or WPF event handler, the newly inserted code would mismatch, say…)

(Bob Russell) #13

Understood. I’ll keep an eye on it and update you if I find an example where it occurs with a totally “own edited” file.