including Markdown .md files in phpdoc - phpdoc

I have a couple of Markdown.md files that I would like to include as part of the PHPDOC auto generated documentation.
I tried including the markdown extension to the phpdoc.xml file as below,
<extensions>
<extension>php</extension>
<extension>php3</extension>
<extension>phtml</extension>
<extension>md</extension>
</extensions>
but when I run the phpdoc. It says,
No parsable files were found, did you specify any using the -f or -d parameter?
P.S The phpdoc runs fine on other php files and folders, just the markdown files are not picked up.

Related

How to lint .cshtml files?

Using ESLint, it's easy to lint *.js files. Using a plugin like html or script-tag, it's also simple to lint JavaScript code inside tags in *.html files.
However, when it comes to script tags inside *.cshtml files, I'm stuck.
Does anyone know how to lint *.cshtml files or recommend a different linting tool for that?

Sphinx apidoc not automated enough

I'm working in a large repo with ~100 individual folders, each with 20-30 sub-folders, each of which contain their own .py folders. Currently I have to create the .rst file for each file using the sphinx-apidoc command, then add the path to the conf.py file then add the .rst file to the index.rst file. Is there anyway of automating this so that all of this is done with just a couple of commands.
The sphinx-autodoc extension states that it will document Python packages. Python packages in turn require that their files (modules) be contained within a directory, and that each directory contain a file with the name of __init__.py.
After you have properly set up your files and directories, then Sphinx can import them and run sphinx-autodoc as expected.

cppcheck-vs-addin - How to remove folder from check

I'm trying to configure cppcheck-vs-addin to automatically check my code on save. So far, so good. However, when I run it on my whole project, I want to exclude several folders (containing sources and headers I have no control on).
Files im trying to exclude are in folder libs\something\files.*
Folder tree is something like
src
| Folder A
| Folder B
libs
| LibsA
| LibsB
What I have tried so far :
-In settings, I added -ilibs to the additionnal arguments field
-In Edit solution suppressions / Excluded include path : .*\\libs\\.* (this should work for headers file, but I also have source files)
-In Edit solution suppressions / Files excluded from check .*\\libs\\.* (this option only seem to work on file name, not on the containing folder, so in this case it does nothing)
Additionnal question, is it possible to view the cppcheck.exe command that is run? It could help understanding what im doing.
If you have installed CPPCheck (and that it is on it's default location), add the path C:\Program Files (x86)\Cppcheck to Environment variable. Now update your pre build events from your project property and invoke cppcheck directly from there. Check this image how you can specify PreBuild Events
Visual Studio C++ Project Property Page to setup Pre-Build Event
Now you can provide argument to exclude directory (like any third party code etc.) from scan.
cppcheck --project=$(MSBuildProjectFullPath) -i "$(ProjectDir)foo\src\" --output-file="$(OutDir)$(TargetName).xml"
--project=$(MSBuildProjectFullPath) selects your current project file (.vcproj or .vcxproj) file,
-i Specifies the directory you want to exclude from scan
--output-file="$(OutDir)$(TargetName).xml" creates the output file in project output directory with analysis results.
To see detail argument list, type cppcheck --help in your command line.

Yard relative link to extra file

I want to link to another extra file from my README using Yard.
For example, I have the following line:
...detailed instructions [here](contributing.md) on how to contribute
I want this to link to my file contributing.md in the same directory. I can include the extra file in my .yardopts file, and it will show up in the file list as it should.
So then I found that I can use the yard DSL to make the link work:
...detailed instructions {file:contributing.md here} on how to contribute
However this will not work if the README is being read from Github. Am I naive to want to have it both ways?
Is there a way to link to another .md extra file in markdown using Yard?
I am not sure what you mean with 'if the README is being read from Github'.
The following works for me locally
I add a file to the README via {file:my_file.md test}
I tell yard via the --files command-line option that there is an extra file. The link to 'test' appears in the README. For example in the following way:
bundle exec yard --files my_file.md

Minify JSON (or XML) in XCode build phase

I'm building an iOS app that frequently loads JSON configuration files at runtime.
However, the files are very generous with comments and indenting.
How can I tell XCode to copy minified versions of the files to the bundle during build?
You just need to add a build phase to your target. Here is an example, my build script that converts a multimarkdown file to an HTML file.
# Create the HTML file from the Markdown File
/usr/local/bin/multimarkdown --process-html --output="${SCRIPT_OUTPUT_FILE_0}" --to=html "${SCRIPT_INPUT_FILE_0}"
# Publish the Help Text and Image to Dropbox
if [ -d ~/Dropbox/Public/DCWS-Help-Text ]; then
rsync -t "${SRCROOT}/DC Wire Sizer/en.lproj/"* ~/Dropbox/Public/DCWS-Help-Text/
fi
I create the file in the source directory but added it to my git ignore file. It is a build product and not in source control, but you need to make sure it is in your project and part of the target, so it gets copied into the bundle. Also make sure your build script runs before your copy bundle phase.

Resources