Changes between Version 26 and Version 27 of ErlangShellInterface


Ignore:
Timestamp:
Mar 21, 2013, 10:59:12 AM (12 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ErlangShellInterface

    v26 v27  
    202202#!erlang 
    203203ri:kill_query(QueryID). 
     204}}} 
     205 
     206== Using metric queries == 
     207There is a [[MetricQuery|metric queries]] page, where you can read a general description about metric queries. 
     208 
     209Please, note that all of the metrics can be used as a property in our semantic query language. 
     210 
     211A metric query can be run by executing the followings: 
     212 
     213{{{#!erlang 
     214MetricQueryString = "show number_of_fun for module ('a','b')", 
     215ri:metric(MetricQueryString). 
     216}}} 
     217 
     218=== Querying bad smells === 
     219 
     220On the [[MetricQuery|metric queries]] page, more detailed information can be found about bad smells, and the usage of the metric analyzer mode. 
     221 
     222!RefactorErl console supports querying bad smells in the code.  
     223 
     224In order to utilize it, the metric analyzer mode had to be turned on first: 
     225 
     226{{{#!erlang 
     227ri:metricmode(on). 
     228}}} 
     229 
     230After the metric analyzer mode has been turned on, the bad smells can be queried: 
     231 
     232{{{#!erlang 
     233ri:metricmode(show). 
     234}}} 
     235 
     236which returns a term that describes the modules and functions where the metrics have values outside the user defined limits. 
     237 
     238The metric analyzer mode can be turned off by: 
     239{{{#!erlang 
     240ri:metricmode(off). 
    204241}}} 
    205242