Giter Club home page Giter Club logo

Comments (4)

stephencelis avatar stephencelis commented on July 1, 2024

Failing spec:

diff --git a/spec/doc_check_spec.rb b/spec/doc_check_spec.rb
index 5af9803..556709b 100644
--- a/spec/doc_check_spec.rb
+++ b/spec/doc_check_spec.rb
@@ -53,4 +53,15 @@ class Doc; end
       file_name, 4, "AlsoNoDoc"
     ]
   end
+
+  it 'ignores classes documented elsewhere' do
+    file_name = make_file <<-RUBY
+class Doc; end
+# Documented later.
+class Doc; end
+    RUBY
+
+    violations = check(file_name).violations
+    violations.length.should be_zero
+  end
 end

from cane.

xaviershay avatar xaviershay commented on July 1, 2024

Hmmm, I'm not sure about this one. In all cases I do this I consider a comment even more important than normal, documenting things such as why the monkey-patch is valid, which github issue it links to, and when I should consider removing it.

from cane.

stephencelis avatar stephencelis commented on July 1, 2024

In an example project I'm working on, a class is used as a namespace for other classes and these other classes are defined in separate files. The class itself is not getting reopened for any other purpose. We could reconsider the overall project structure, but this is definitely making Cane more difficult to work with out of the box.

from cane.

xaviershay avatar xaviershay commented on July 1, 2024

Heh, that is the reason cane doesn't enforce documentation on modules. See #10 for discussion of that. I'll sleep on it.

from cane.

Related Issues (20)

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.