Closed PeloWriter closed 4 months ago
Brain dump:
The first solution seems harder to implement but the second solution seems like it is going to make the docs repo and examples harder to maintain.
@bruno-garcia @HazAT any thoughts on this?
I'm afraid many of the snippets wouldn't compile on their own. They'd need some sort of context: Be put inside the Android's Activity class, or be inside a Global.asax.cs
file (for ASP.NET, Windows only) with all the references available, etc.
But perhaps it would be good enough for most cases, and still worth the effort. In that case some sort of opt-out list where we can mark which snippets shouldn't be alerted on might be worth taking into account.
Our aim is not to get them to compile but at least verify that they can be copy/pasted and are syntactically correct. If we can do more, that's awesome but this is a very low bar: code that is valid. 😀
And, we could section this out, so linting starts with specified SDKs. We can roll it out to other SDKs as makes sense.
We should lint code samples to ensure that they are valid.