SonarQubeCommunity / sonar-erlang

12 stars 23 forks source link

Plugin and Erlang version mapping? #17

Open joshOfAllTrades-zz opened 8 years ago

joshOfAllTrades-zz commented 8 years ago

Is there a mapping of which versions of Erlang are supported by which versions of this plugin? I'm encountering issues analyzing Erlang 18.3.

kalidasya commented 8 years ago

Hi,

I think erlang is supported up to 17, if you create a small reproduction with you issues I can try to fix it. or you can create a MR with the fix

joshOfAllTrades-zz commented 8 years ago
mapify_services( Hostname, Services ) -> 
[ 
  #{ 
    id  => ServiceId,
    name => bin( Name ), 
    address => bin( Hostname ), 
    port => Port, 
    type => bin( Type )
  } 
  || { ServiceId, Name, Port, Type } <- Services 
].

The plugin doesn't like the => operator.

joshOfAllTrades-zz commented 8 years ago
get_apis( Services ) when is_list( Services ) -> 
  F = fun( Service, Acc ) when is_map( Service ) -> 
    #{ "vendorservice" := VendorService, "apis" := Apis } = Service, 
    BinApis = [ bin( Api ) || Api <- Apis ], 
    [{VendorService, BinApis} | Acc] 
  end, 
  maps:from_list( foldl( F, [], Services ) ).

The plugin doesn't like the := operator.

kalidasya commented 8 years ago

@joshOfAllTrades map support is there and it seems to work on master, can you build master and give it a try?

kalidasya commented 8 years ago

also the example with => seem to work, if it is failing with master for you, can you send me the full exception?

kalidasya commented 8 years ago

@joshOfAllTrades any result with the snapshot? is it working on your codebase?

FrankGiesecke commented 7 years ago

Does the issue #24 depends on this issue?