You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the repository remote URL is from an unknown git service (see :ref:`Git Services <supported_git_services>` for a list of supported git services in Macaron), Macaron won't recognize it when analyzing the repository.
322
+
323
+
You would need to tell Macaron about that git service through the ``defaults.ini`` config.
324
+
For example, let's say you want to analyze the Bitbucket repository at ``https://bitbucket.org/snakeyaml/snakeyaml``. First, you need to create a ``defaults.ini`` file in the current workspace with the following content:
325
+
326
+
.. code-block:: ini
327
+
328
+
[git_service.local_repo]
329
+
hostname = bitbucket.org
330
+
331
+
In which ``hostname`` contains the domain of the git service URL. In this example it's ``bitbucket.org``.
332
+
333
+
.. note::
334
+
335
+
This ``defaults.ini`` section must only be used for analyzing a locally cloned repository. If the domain name has already been supported in other services, it doesn't need to be defined again here.
336
+
337
+
Assume that the dir tree at the current workspace has the following structure:
338
+
339
+
.. code-block:: shell
340
+
341
+
boo
342
+
├── foo
343
+
│ └── snakeyaml
344
+
345
+
We can run Macaron against the local repository at ``snakeyaml`` by using this command:
With ``rest_of_args`` being the arguments to the ``analyze`` command (e.g. ``-b``, ``-d`` or ``--skip-deps`` similar to two previous examples).
352
+
353
+
The ``-lr`` flag tells Macaron to look into ``path/to/boo/foo`` for local repositories. For more information, please see :ref:`Command Line Usage <cli-usage>`.
354
+
355
+
.. note:: If ``-lr`` is not provided, Macaron will looks inside ``<current_working_directory>/output/git_repos/local_repos/`` whenever you provide a local path to ``-rp``.
If the local repository you want to analyze has remote origin hosted on a supported git service, you can run the analysis directly without having to prepare ``defaults.ini`` as above.
362
+
363
+
Assume that the dir tree at the current workspace has the following structure:
318
364
319
365
.. code-block:: shell
320
366
@@ -326,13 +372,13 @@ We can run Macaron against the local repository at ``target`` by using this comm
With ``rest_of_args`` being the arguments to the ``analyze`` command (e.g. ``-b``, ``-d`` or ``--skip-deps`` similar to two previous examples)
377
+
With ``rest_of_args`` being the arguments to the ``analyze`` command (e.g. ``-b``, ``-d`` or ``--skip-deps`` similar to two previous examples).
332
378
333
-
The ``-lr`` flag configure Macaron to looks into ``path/to/boo/foo`` for local repositories. For more information, please see :ref:`Command Line Usage <cli-usage>`.
379
+
The ``-lr`` flag tells Macaron to look into ``path/to/boo/foo`` for local repositories. For more information, please see :ref:`Command Line Usage <cli-usage>`.
334
380
335
-
.. note:: If ``-lr`` is not provided, Macaron will looks inside ``<working_directory>/output/git_repos/local_repos/`` whenever you provide a local path to ``-rp``.
381
+
.. note:: If ``-lr`` is not provided, Macaron will looks inside ``<current_working_directory>/output/git_repos/local_repos/`` whenever you provide a local path to ``-rp``.
0 commit comments