atom/deprecation-cop

Different deprecation messages from within the same method aren't honored in display

Closed this issue · 1 comments

I'm issuing different deprecation warnings in a method depending on the value of parameters, but the calls are all getting rolled into the same message.

  behavior: (behaviorName) ->
    switch behaviorName
      when 'active'
        Grim.deprecate("The $active behavior property is deprecated. Use ::observeActive or ::onDidChangeActive instead.")
      when 'container'
        Grim.deprecate("The $container behavior property is deprecated.")
      when 'activeItem'
        Grim.deprecate("The $activeItem behavior property is deprecated. Use ::observeActiveItem or ::onDidChangeActiveItem instead.")
      when 'focused'
        Grim.deprecate("The $focused behavior property is deprecated.")
      else
        Grim.deprecate("Pane::behavior is deprecated. Use event subscription methods instead.")

    super

screenshot 2014-09-03 16 29 04

This seems to be resolved now.