Podspec can't use utf-8 without lint failure #108

Closed
febeling opened this Issue Apr 11, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@febeling

Ruby uses a magic comment in the first line of the file to specify the encoding of the file. Otherwise ASCII is assumed.

To specify utf8, a comment like this is put into the first line of the source file:

# -*- coding: utf-8 -*-

When running pod lib lint on this, a warning is issued and the lint fails. This is the output:

$ pod lib lint
-> Pixltag (0.1.0)
    - WARN  | Comments placed at the top of the specification must be deleted.

[!] Pixltag did not pass validation.
You can use the `--no-clean` option to inspect any issue.

I don't think this is very helpful. Non-ascii names are impossible to use then.

@orta

This comment has been minimized.

Show comment Hide comment
@orta

orta Apr 11, 2014

Member

we can probably remove that comment check pretty soon entirely with the upcoming specs repo changes.

Member

orta commented Apr 11, 2014

we can probably remove that comment check pretty soon entirely with the upcoming specs repo changes.

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy Apr 11, 2014

Member

It shouldn’t even matter in the case of a podspec, as we don’t use require/load. Instead we always read the file as UTF-8 and then eval the source.

Did you encounter a real problem?

Member

alloy commented Apr 11, 2014

It shouldn’t even matter in the case of a podspec, as we don’t use require/load. Instead we always read the file as UTF-8 and then eval the source.

Did you encounter a real problem?

@alloy alloy closed this Apr 11, 2014

@febeling

This comment has been minimized.

Show comment Hide comment
@febeling

febeling Apr 11, 2014

My editor, emacs, inserts an encoding comment there automatically when editing ruby. If you choose to out rule that and only accept an arbitrary subset of ruby syntax with your linter, that's your design choice.

My editor, emacs, inserts an encoding comment there automatically when editing ruby. If you choose to out rule that and only accept an arbitrary subset of ruby syntax with your linter, that's your design choice.

@alloy

This comment has been minimized.

Show comment Hide comment
@alloy

alloy Apr 11, 2014

Member

@febeling I see. I guess what @orta says makes sense, we can soon remove the check anyways.

Member

alloy commented Apr 11, 2014

@febeling I see. I guess what @orta says makes sense, we can soon remove the check anyways.

@alloy alloy reopened this Apr 11, 2014

Ashton-W pushed a commit to Ashton-W/Core that referenced this issue Nov 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment