Code Monkey home page Code Monkey logo

Comments (4)

urbanas avatar urbanas commented on July 30, 2024

Same here. Replacing 'split("\n")' with 'splitlines()' fixes the issue.

from robotframework-lint.

fperrin avatar fperrin commented on July 30, 2024

Shot in the dark: would that file have DOS-style end-of-lines (or worse, mixed-style end-of-lines)?

Depending on how the file is read (which encoding, and whether it's opened in binary mode), Python's universal newlines might not strip \r at the right time. Although to @ltdemian 's point, it's probably splitlines that should be used, rather than split("\n").

from robotframework-lint.

davidk1 avatar davidk1 commented on July 30, 2024

@fperrin file-encoding: UTF-8, Pycharm on Windows 10, line-separator: CRLF, robotframework-lint=1.0

  1. With lint=0.9 there is no difference in results between changing line-separator: CRLF, LF and CR
  2. With lint=1.0 I am getting different results for every possible setting of line-separator: CR, LF and CRLF

from robotframework-lint.

fperrin avatar fperrin commented on July 30, 2024

I think you're right, my mention of mixed EOL is not relevant. That's a problem in rflint, and we should use splitlines. That's an easy enough change, but unfortunately rflint isn't seeing much activity these days.

from robotframework-lint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.