Git Product home page Git Product logo

configparser_ex's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

configparser_ex's Issues

seeing safety warnings in Elixir 1.2.3

C:\code\myproject>iex -S mix
...
lib/ConfigParser/ParseState.ex:23: warning: the variable "new_result" is unsafe as it has been defined in a conditional clause,
 as part of a case/cond/receive/if/&&/||. Please rewrite the clauses so the value is explicitly returned. For example:

    case int do
      1 -> atom = :one
      2 -> atom = :two
    end

Can be rewritten as:

    atom =
      case int do
        1 -> :one
        2 -> :two
      end

lib/ConfigParser/ParseState.ex:43: warning: the variable "new_values" is unsafe as it has been defined in a conditional clause,
 as part of a case/cond/receive/if/&&/||. Please rewrite the clauses so the value is explicitly returned. For example:

    case int do
      1 -> atom = :one
      2 -> atom = :two
    end

Can be rewritten as:

    atom =
      case int do
        1 -> :one
        2 -> :two
      end

==> configparser_ex
Compiled lib/ConfigParser/ParseState.ex
Compiled lib/configparser.ex
Generated configparser_ex app
...

Multi-line strings parsed as one long string

Hi,

I noticed that multi-line strings are parsed into one long line here: https://github.com/easco/configparser_ex/blob/master/lib/ConfigParser/ParseState.ex#L70 It would be nice to have an option to return the parsed string with newlines rather than the lines joined with a space. Maybe a option to parse_string and parse_file like: parse_string("stuff here", continuation: :newline) or parse_string("stuff here", continuation: :space) where the default is the current behavior of space?

Cannot compile: "function nil.new/0 is undefined"

% mix deps.get 
Resolving Hex dependencies...
Dependency resolution completed:
New:
  configparser 4.0.0
All dependencies are up to date

% mix deps.compile
==> configparser
Compiling 2 files (.ex)

== Compilation error in file lib/ConfigParser/ParseState.ex ==
** (UndefinedFunctionError) function nil.new/0 is undefined. If you are using the dot syntax, such as map.field or module.function(), make sure the left side of the dot is an atom or a map
    nil.new()
    lib/ConfigParser/ParseState.ex:22: (module)
    (stdlib 3.17) erl_eval.erl:685: :erl_eval.do_apply/6
could not compile dependency :configparser, "mix compile" failed. You can recompile this dependency with "mix deps.compile configparser", update it with "mix deps.update configparser" or clean it with "mix deps.clean configparser"
% elixir --version
Erlang/OTP 24 [erts-12.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Elixir 1.12.2 (compiled with Erlang/OTP 24)

(Same thing with Elixir 1.9.)

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.