Comments (4)
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.
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.
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.
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)
- Can I get write access?
- Ruby 3 incompatibility (call to `File.exists?`)
- HTML generated output HOT 3
- New vs. Old Hash syntax HOT 1
- Review guard-cane HOT 2
- Vim plugin HOT 4
- value "class" raises exception in multiline definition of array using %w HOT 3
- Classes with no methods still require a comment if they are defined within a class HOT 2
- Consider switching to Parser? HOT 2
- JsonFormatter not working from rake task
- Invalid byte sequence in UTF-8 (ArgumentError) HOT 1
- Allow Cane::RakeTask to pick up .cane files in subdirectories HOT 1
- License missing from gemspec HOT 1
- Global .cane file HOT 2
- Recursively run cane over a directory of files HOT 5
- Load .cane files when scanning subdirectories
- Rspec integration in spec_helper.rb HOT 1
- feature request: alert on no newline at end of file HOT 1
- bug: stack level too deep HOT 2
- bug: stack level too deep (with repro) HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cane.